Skip to content
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

Link is not rendered when a HTML tag is present one line above #2517

Closed
blikblum opened this issue Jul 1, 2022 · 3 comments
Closed

Link is not rendered when a HTML tag is present one line above #2517

blikblum opened this issue Jul 1, 2022 · 3 comments

Comments

@blikblum
Copy link

blikblum commented Jul 1, 2022

Marked version:
4.0.17 or master

Describe the bug
When a html tag (tested with br and hr) is followed by a line with link , the link is rendered as is (not converted to a tag)

To Reproduce
Steps to reproduce the behavior:

Marked: https://marked.js.org/demo/?text=%23%20Hello%0A%0AText%0A%0A%3Cbr%3E%0AHello%20%5Blink%5D(https%3A%2F%2Fmarked.js.org%2F)%20%0A&options=%7B%0A%20%0A%7D&version=master

Dingus: https://spec.commonmark.org/dingus/?text=%23%20Hello%0A%0AText%0A%0A%3Cbr%3E%0AHello%20%5Blink%5D(https%3A%2F%2Fmarked.js.org%2F)%20%0A%0A

Showdow: http://demo.showdownjs.com/#!/%23%20Hello%0A%0AText%0A%0A%3Cbr%3E%0AHello%20%5Blink%5D(https%3A%2F%2Fmarked.js.org%2F)

Expected behavior
The markdown link should be rendered as html

While dingus also not renders, this is not expected as a user POV.
Showdown renders as html

@UziTech
Copy link
Member

UziTech commented Jul 1, 2022

Marked follows CommonMark. Markdown inside an html block is rendered as html not markdown. If you add a blank line below the html tag it will work.

@blikblum
Copy link
Author

blikblum commented Jul 1, 2022

Thanks

@blikblum blikblum closed this as completed Jul 1, 2022
@blikblum
Copy link
Author

blikblum commented Jul 1, 2022

Created an issue in the editor that created the markdown: nhn/tui.editor#2586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants