-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issueSimilar to L1 - broken but there is a known workaround available for the issuecategory: listsreleased
Description
marked 2.0.0
Sorry if it is not a bug, but a feature...
In a semantic tree (marked.lexer) an empty space between List and Paragraph appears in a last list_item. It looks unlogical.
While traverse the tree, you should write additional code for exclude this empty space from list_item. And then write code to add space between List and Paragraph.
Expected: Space node should be at the first level of the semantic tree, between the List and the next Paragraph
for reproduce, please visit:
https://codesandbox.io/s/markedjs-klt1h?file=/src/marked8lexer.js
import marked from "marked";
const markdownText = `This is paragraph
this is a list with 3 items:
- item one
- item two
- item tree
Here is another paragrah.`;
const lexerArray = marked.lexer(markdownText);
console.log(lexerArray);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
L2 - annoyingSimilar to L1 - broken but there is a known workaround available for the issueSimilar to L1 - broken but there is a known workaround available for the issuecategory: listsreleased
