question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue rendering nested HTML

See original GitHub issue

Some nested HTML tags don’t get rendered correctly. One example is <div></div><div><div></div></div>, which gets compiled as <div> &lt;div&gt; <div></div><div></div></div>. It seems to be related to the detection of HTML, since entering <div>#a</div> compiles to <div><h1>a</h1></div>. A few versions back markdown-to-jsx compiled those strings correctly. Just a sidenode: entering "<span>#a</span>" crashes the compiler.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelryancaputocommented, Apr 4, 2018

Just for reference, I posted some use cases here: This is an example using 6.4.1 - https://stackblitz.com/edit/react-qugqd6 This is an example using 6.6.1 - https://stackblitz.com/edit/react-6nelfr

1reaction
probablyupcommented, Apr 3, 2018

Hmm ok. I’ll see if there’s a way to do this without introducing a ton of bundle size. On Tue, Apr 3, 2018 at 1:05 PM Stephan Troyer notifications@github.com wrote:

Actually there are https://daringfireball.net/projects/markdown/syntax#html:

Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style emphasis inside an HTML block. […] Unlike block-level HTML tags, Markdown syntax is processed within span-level tags.

Otherwise it wouldn’t be possible to start with an hashtag within an element without escaping it. (For example, I would like to display the hex color code.)

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/probablyup/markdown-to-jsx/issues/168#issuecomment-378324156, or mute the thread https://github.com/notifications/unsubscribe-auth/AAiy1mby0ciY4TgulKmvgin7lpvNfYCsks5tk6vtgaJpZM4TC0qM .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why vhtml not rendering nested << properly?
But when I am trying to render it in vhtml, its not even showing the parent element. I want it like Name: <<Name>>...
Read more >
Deeply nested elements are not rendered (TAGLVL has ...
Summary: Upon too many nested tables, Mozilla begins to break out of the outer tables incorrectly → Deeply nested elements are not rendered...
Read more >
8.2.3. Nested Elements - Web Design in a Nutshell, 3rd ...
This results in an incorrect overlapping of elements that would make an XHTML document malformed and may cause rendering problems for HTML documents....
Read more >
{{< html-shortcodes >}} are rendered as markdown when ...
TL;DR: how can I prevent {{< html-shortcodes >}} nested inside of ... Nested shortcodes get rendered as Markdown · Issue #2173 · gohugoio/ ......
Read more >
Rendering nested block content
Rendering nested block content · function ImageBlockLeftSerializer(props) { const img = h('img', {src: getImageUrl({ node: props. · export default ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found