Coder Social home page Coder Social logo

Comments (7)

quantizor avatar quantizor commented on May 24, 2024

Yuck, looking into this. Thanks for reporting.

from markdown-to-jsx.

quantizor avatar quantizor commented on May 24, 2024

Fix is out in 6.6.6 thanks! https://github.com/probablyup/markdown-to-jsx/releases/tag/6.6.6

from markdown-to-jsx.

niallel avatar niallel commented on May 24, 2024

Thanks so much, it fixes the first issue but it doesn't fix the second issue.

When there is
<Markdown>{'1<a or 2>1'}</Markdown>
It will be output as
11

Any ideas?

from markdown-to-jsx.

quantizor avatar quantizor commented on May 24, 2024

That one is more difficult to solve; will have to think more on it.

The problem is it is being detected as an <a> tag and then probably thrown out on render since the syntax is invalid, resulting in 11. We don't validate individual attribute groups at HTML detection time or do any enforcement of self-closing vs normal html syntax to save on library size (would introduce a fair amount of code.)

from markdown-to-jsx.

niallel avatar niallel commented on May 24, 2024

Maybe allow
&gt; &lt;
to be displayed correctly.

At the moment if you pass <Markdown>{'&gt;'}</Markdown> then &gt; will be shown.

If you parsed those and displayed as > < then you wouldn't need to worry about this.

from markdown-to-jsx.

quantizor avatar quantizor commented on May 24, 2024

from markdown-to-jsx.

niallel avatar niallel commented on May 24, 2024

Thanks, I completely understand your reasoning.

Maybe its my understanding, but &gt; gets displayed correctly by the browser as >
But when its inside the browser doesn't render it correctly.

I've worked around it by putting spaces around < or > as there shouldn't be any HTML in my input, just curious as to why when I pass in > it doesn't get shown correctly.

from markdown-to-jsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.