Markdown table rendered as heading if text follows before it and horizontal rule after it #3610
Labels
category: headings
category: tables
L2 - annoying
Similar to L1 - broken but there is a known workaround available for the issue
Marked version:
15.06
Describe the bug
Markdown tables are not rendered correctly when there is text immediately preceding the table definition and horizontal rule. Everything is misinterpreted as heading, leading to incorrect formatting.
Found it using Marked npm library in vue js running the following line:
markdown.value = await marked(inputValue);
To Reproduce
Steps to reproduce the behavior:
P.S. A quick fix can be done by adding a new line after the first text line, but considering a use case where one may need to parse many markdown files, its very inefficient.
Example:
Input:
Output:
Demo:
Expected behavior
From following markdown table parsed as table, text as p tag and horizontal rule as hr tag. This can be tested in this website, sorry I couldn't permalink it here - https://www.devloom.net/previewers/MARKDOWNPreviewer
Input:
Correct output:
The text was updated successfully, but these errors were encountered: