markdown-to-jsx
markdown-to-jsx copied to clipboard
Page crashes when using multiple em tags
found out that the following text makes an infinte loop inside the package, which crashes the page:
n <em>the</em> Apple macOS operating system,.DS_Store is a file that stores custom attributes of its containing... <em>the</em> file desktop.ini in Microsoft Windows.... , on Mac OS X 10.4 "Tiger" and later, <em>the</em> ".DS_Store" files contain <em>the</em> Spotlight comments of <em>the</em> folder's... <em>The</em> complaints of many users prompted Apple to publish means to disable <em>the</em> creation of these files... upon reaching a (duplicate) .DS_Store file, forcing <em>the</em> user to restart <em>the</em> copy operation from <em>the</em>
tested here: https://probablyup.com/markdown-to-jsx/
Running into this issue as well when generating some custom markdown with overrides, it seems to be getting hung up on us when running into an _
in a string and attempting to find a closing _
. Our work involves having email addresses in the string being sent so the _
that is often used in an email was causing it to hang indefinitely.
There seems to be some recursive problem with the regex for the TEXT_EMPHASIZED_R
expression. Would love to see this resolved, but in the meantime going to find a bit of a hacky way to escape our _
's with adding \\
in front of them (possibly) 😬 only adding that here in case it helps!
Similar issue to #396 and #433