Markdown Table with remark-gfm and remark-raw adding an excessive amount of newlines before it. #1449
Unanswered
ranidspace
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have no idea what's going on so sorry if I'm unable to give enough information. I have a table in a markdown document, it has about 100 rows, however the resulting html it gives out adds 700 empty lines to the source before the table.
I use the following to parse the markdown:
I have an ordered list which needs to be reversed, as well as some tags which markdown doesnt support by default, so I need rehypeRaw (if there's a better way tell me). If I remove Gfm or Raw, it renders without any extra lines. Removing "allowDangerousHTML: true", and Sanitize keeps the extra lines.
It also removes any formatting and newlines inside of the table element html as well.
I checked with nothing else in the document, and the lines were still added. I truncated the table to 5 lines, and it created 32 blank lines in front instead. Any way I tried modifying the table produced the same result. My guess is that all the newlines inside of the table get moved to before it.
It's not visible in the rendered page, and it goes away if I use rehype-format or rehype-minify, but I like the default way it converts it. Is this a bug or am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions