-
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
HTML inside markdown will cause it fail to parse. #2018
Comments
It looks like it is working fine in this demo. Even if you change the version to 2.0.2. Could you explain more about where this is happening and your exact code? Some screenshots would be helpful as well. |
@UziTech I have tried to reproduce on online editor such as codepen, but fail to do so. I have now successfully created an demo with Angular 2 repository. Which you can access at here. Once cloned, execute The marked version I have used is 2.0.3. I do use custom renderer, but even without the custom renderer, the problem still persist I believe. |
I see the issue. Your markdown is indented (demo). The html elements are ended at the first blank line but you don't have any actual blank lines after the html elements because they all have space characters in them. Marked should be fixed to see lines with only spaces as an end to html elements but you can also fix it by removing the spaces from blank lines. |
Looks like that is cause, we will use older version until its fixed. Thanks |
If you want to create a PR it could be fixed faster 😁👍 |
After checking different versions with the interactive demo tool I believe that it was introduced in 1.2.8, so this might have been related to this PR: #1889 |
Should the following render markdown as well (no new lines) too?
Currently it doesn't. This works (empty line, no indent):
But this doesn't (line with whitespaces):
|
@krassowski no according to the spec |
Indeed. It might not be a great UX but I guess this how the spec was defined, so no discussion here. Does it mean that my #2052 PR does solve this issue properly? |
🎉 This issue has been resolved in version 2.0.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Marked version:: Since
1.2.2
, latest I have test is2.0.2
.Describe the bug
In version
1.2.2
to2.0.2
, all those version have issue where if there is HTML inside markdown, it will cause anything after HTML to not be parsed.To Reproduce
Steps to reproduce the behavior:
marked options
Expected behavior
Markdown after HTML should be parsed. This was fine on version
1.1.1
.The text was updated successfully, but these errors were encountered: