Image on a newline is not parsed correctly
See original GitHub issueWith markdown like this:
Sample image:
<img src="https://upload.wikimedia.org/wikipedia/en/f/f4/Unrealtournament.jpg" />
Image is parsed as HtmlBlock
by Commonmark parser, not as HtmlInline
, later this is handled by SpannableMarkdownVisitor::visit(HtmlBlock htmlBlock)
which assumes tag as null
and passes it to Html.fromHtml
which doesn’t support images.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
New line character is appended when a image is downloaded ...
1 Answer 1 ... I do not know why empty line is getting appended, but when tries to create the same scenario of...
Read more >[JENKINS-31573] New line characters are not parsing correctly
To address this issue I submitted a pull request to force parsing as a standard Java properties object and then also extracted the...
Read more >FAQ - Newline Interactive
5. Navigate to Control Panel>Display Settings>Change Display Settings and under the “Multiple displays” drop down window, select “Duplicate these displays” and ...
Read more >Common Questions - Technical Support - Freshdesk
Issue: Touch functionality is off or not working as expected To get started ... in extended mode **For MacOS visit: Helpdesk : Newline...
Read more >PuTTY new line not working properly - Super User
And PuTTY does go to the next line but does not reset the column. Shown here enter image description here. How can I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @Adonai !
About Jsoup. It turned out that it’s not that heavy. And if you strip all unused code that does selectors and fixing malicious HTML content, it’s about ~100KB. I think for the control that we get over HTML it bearable. Anyway, Jsoup (like TagSoup) cannot be used by Markwon directly as they do not allow processing HTML input in chunks. I had to repackage Jsoup parsing (Tokeniser) functionality and introduce some minor changes. There is still ability to not include HTML parser (it is in different artifact). And there is of cause an ability to provide own implementation (API is defined in
markwon-html-parser-api
artifact, you can inspect it, and maybe create something that will answer your needs).About documentation. I used vuepress. It’s absolutely amazing. At least compared with Jekyll. It’s perfect for technical documentation (not so good for blogging though). I think it’s the engine behind all Vue.js documentation (pretty cool also).
About markdown fragment that you provided. I just used commonmark-dingus and it renders it the same. Adding a
<br>
makes text after image to be in a different paragraph.Minor note:
This markdown:
looks like this:
i.e. the image is on a new paragraph but the text following it is not, just a line break. Is this expected behaviour?