-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Lazy list/blockquote breaks container w/ remark-gfm
#3
Comments
It doesn’t seem related to the tag:
Does the same |
thanks for reporting, @blattersturm. Might have to do with checkboxes because that’s a GFM feature relating to lists... 🤔 Or maybe it’s tables being annoying again |
It appears to be tables, indeed. |
I have another example rather than #9, which might be related to this issue as well. Take this markdown for instance:
Github renders this as:
but the output in https://codesandbox.io/s/react-markdown-forked-9q50f?file=/src/App.js Anything we can do to help in order to get the fix as soon as possible? This is happening in a lot of markdowns since it relates to almost every component which is sort of "indented", so I think this should be in highest priority. |
It is not currently my priority. It is incredibly complex. Standard markdown is line based, so micromark is line based and set up as streaming for its parsing. GFM breaks that, so it means flipping the architecture, loosing features
PR == welcome! So is sponsoring us. |
remark-gfm
Is this issue fixed? I'm having the same issue with |
Yes, see the commit that closes this. You are having problems because you’re on old packages. You should update. |
Yes, I did see the commit and it fixes the problem, but I have an old package. But I just can't update it since its a monorepo(both frontend and backend in the same repo) and a legacy project. Can you suggest any other alternative to fix this while using the react-markdown@6.0.3 and react-gfm@1.0.0 ? |
There is no alternative. |
I solved it with css: ol {
list-style: none;
counter-reset: orderedListCounter;
}
ol li {
counter-increment: orderedListCounter;
}
ol li::before {
content: counter(orderedListCounter) '. ';
font-weight: bold;
} I was observing this issue with "react-markdown": "^8.0.7", "remark-gfm": "^3.0.1", not sure what was actually causing the issue but it was easier to just fix it with css for my small project. |
Subject of the issue
With the
remark-gfm
plugin enabled, in a list indented with 4 characters, a HTML tag with a 3-character indent will split up the list.Your environment
Happens on astexplorer.net too.
Steps to reproduce
Expected behavior
No paragraph is generated, the list is entirely complete (as happens with the GFM plugin disabled).
Actual behavior
The
<br>
and onwards signal the end of the list, and entry3.
will be a plain text in a paragraph.(edited by wooorm to fix markdown)
The text was updated successfully, but these errors were encountered: