This PR aims to fix #541 while still protecting against #493.
Whilst attempting to fix a ReDOS, I changed the _strong_re to use a greedy pattern, which would consume the lengthy ReDOS input without spending too much processing time on it. However, this also caused the _strong_re to consume multiple bold words as one.
The fix here is to make the regex non-greedy again.
This should match the opening syntax followed by a non-whitespace char, one or more characters followed by an optional <em> closer, and then the closing syntax preceeded by a non-whitespace char.
This PR aims to fix #541 while still protecting against #493.
Whilst attempting to fix a ReDOS, I changed the
_strong_re
to use a greedy pattern, which would consume the lengthy ReDOS input without spending too much processing time on it. However, this also caused the_strong_re
to consume multiple bold words as one.The fix here is to make the regex non-greedy again.
This should match the opening syntax followed by a non-whitespace char, one or more characters followed by an optional
<em>
closer, and then the closing syntax preceeded by a non-whitespace char.