Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lexer and tokenizer to retain line breaks properly #2341

Merged
merged 6 commits into from
Jan 6, 2022

Conversation

phillipb
Copy link
Contributor

@phillipb phillipb commented Dec 31, 2021

Marked version:
4.0.8

Markdown flavor: n/a

Description

This PR stops ignoring single \n characters and makes sure they're properly represented in the token list for each token type in the lexer.

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link

vercel bot commented Dec 31, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/markedjs/markedjs/8heK88jvf6Z7JZpS8ctiZnYCcij6
✅ Preview: https://markedjs-git-fork-phillipb-master-markedjs.vercel.app

test/unit/Lexer-spec.js Outdated Show resolved Hide resolved
Copy link
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! 💯

@UziTech UziTech merged commit a9696e2 into markedjs:master Jan 6, 2022
github-actions bot pushed a commit that referenced this pull request Jan 6, 2022
## [4.0.9](v4.0.8...v4.0.9) (2022-01-06)

### Bug Fixes

* retain line breaks in tokens properly ([#2341](#2341)) ([a9696e2](a9696e2))
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

🎉 This PR is included in version 4.0.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The lexer appears to handle new lines incorrectly
3 participants