markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

Issue after version 7.7.3 (Error parsing inline components)

Open desiprisg opened this issue 7 months ago • 1 comments

Something like

Test <Tooltip>
  <TooltipTrigger>test</TooltipTrigger>
  <TooltipContent>
    test
  </TooltipContent>
</Tooltip>

did not cause an error before version 7.7.3.

It now does. This breaks existing content.

desiprisg avatar Apr 13 '25 14:04 desiprisg

I have the same issue - it seems to be that nested components are not supported after 7.7.3 - unless I'm doing something wrong it appears that `<ClickReveal label="Step 3" style="default">

<Card className='task'>Write a paragraph, and then list:

  • a bullet italic.
  • another bullet.
Some text. ` in 7.7.3 and above renders fine but after that the markdown inside the component is converted to a string rather than being parsed again.

boblete avatar Jun 06 '25 08:06 boblete

@quantizor this started breaking on 7.7.4 here a codesandbox for you to reproduce: https://codesandbox.io/p/sandbox/3xx6pt (version: 7.7.12)

"expected columns: 'user_id', 'user_first_name', 'user_last_name'."

OUTPUT 🛑

Image

EXPECTED OUTPUT 👇

Image

https://codesandbox.io/p/devbox/youthful-goldwasser-forked-dn473k (version 7.7.3)

csantos-nydig avatar Jul 18 '25 14:07 csantos-nydig

Please contribute a failing test and will look into it

quantizor avatar Jul 18 '25 14:07 quantizor

Generally speaking, code things should be in backticks since there is syntax ambiguity there with the underscores

quantizor avatar Jul 18 '25 14:07 quantizor

Alternatively, escaping the underscore should also work.

quantizor avatar Jul 18 '25 14:07 quantizor

thanks for the quick response Evan.

Sorry to double down on the issue, but look at the following examples here in the Github comment section:

Image Image

notice it understands when the _ was meant to be used for italic-style, versus not.


Also, the live example in https://markdown-to-jsx.quantizor.dev/ seems to work just fine

Image

So, I'm unsure what default configuration might be missing, because I don't think we should escape characters that works elsewhere and used to work in 7.7.3 and earlier

csantos-nydig avatar Jul 18 '25 14:07 csantos-nydig

Also, I'm unsure if the issues reported by @desiprisg and @boblete are related because their examples are no easy to replicate; I just posted mine here because it was "issue after version 7.7.3"

csantos-nydig avatar Jul 18 '25 14:07 csantos-nydig

Also, I'm unsure if the issues reported by @desiprisg and @boblete are related because their examples are no easy to replicate; I just posted mine here because it was "issue after version 7.7.3"

Same issue as this one, right? https://github.com/quantizor/markdown-to-jsx/issues/662

ssh-peppe avatar Sep 30 '25 13:09 ssh-peppe

Should be fixed in v9

quantizor avatar Nov 22 '25 08:11 quantizor