quantizor / markdown-to-jsx

🏭 The most lightweight, customizable React markdown component.
https://markdown-to-jsx.quantizor.dev/
MIT License
2.01k stars 174 forks source link

HTML decimal code #371

Open federico-bellucci opened 3 years ago

federico-bellucci commented 3 years ago

I can see from the Read.me file that I can specify HTML entities to be parsed, but how can I parse HTML decimal codes like ' (')?

mrpineapples commented 3 years ago

Having the same issue and it looks like only letters are being checked for https://github.com/probablyup/markdown-to-jsx/blob/master/index.tsx#L301

A PR to update the regex (to search for numbers and the #) seems like the only way to get past this. You also use he to decode the string before passing it to <Markdown/> which is what I'm doing now.

federico-bellucci commented 3 years ago

I switched to react-markdown. It worked nicely