-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Token type paragraph
becomes text
in master
#1247
Comments
v0.3.19 actually outputs the correct type, it is master that outputs 'text' instead of 'paragraph' looks like the culprit is d08039e#diff-81ab0a5aa39b7a91951fc28d2d151496R36 Just adding that question mark back seems to fix this issue. I'm not sure if it introduces new issues. @Feder1co5oave was that a mistake or is there a reason the question mark was removed? looks like all tests pass when I just add the question mark back |
paragraph
becomes text
in last versionsparagraph
becomes text
in master
I added a PR that adds back the question mark and adds a test for this issue #1248 |
@vsemozhetbyt thanks for reporting this 💯 |
@UziTech it made sense to me at the time, because the types of token matched by the negative lookahead that follows (these are the ones capable of interrupting paragraphs) should be on a new line anyway, but it was a naive change. The matching of one paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)+)/,
// this ^ In the case of a one-line paragraph like in the reported example, the required newline (followed by some other Also, I just noticed that the |
Marked version:
0.3.19masterMarkdown flavor: CommonMark ?
Test Script
Expectation
The output from the old version 0.3.6
Result
The output from the
0.3.19master:Is this cange intended?
The text was updated successfully, but these errors were encountered: