-
Notifications
You must be signed in to change notification settings - Fork 527
Open
Description
Hi,
with both Markdown and MarkdownExtra there are issues with very long content like inline images.
php-markdown/Michelf/MarkdownExtra.php
Lines 1065 to 1071 in 5161316
| $text = preg_replace_callback( | |
| '{ | |
| (^.+?) # $1: Header text | |
| (?:[ ]+ ' . $this->id_class_attr_catch_re . ' )? # $3 = id/class attributes | |
| [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer | |
| }mx', | |
| array($this, '_doHeaders_callback_setext'), $text); |
php-markdown/Michelf/Markdown.php
Lines 903 to 904 in 5161316
| $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', | |
| array($this, '_doHeaders_callback_setext'), $text); |
pcre.backtrack_limit of 1000000. I was about to create a re-producer, but I basically see the same issue on regex101.com and it might be simpler to play around with there: https://regex101.com/r/BcWE82/1
Do you think this is something that can be improved or is it suggested to increase pcre.backtrack_limit to deal with this? This could be the same as #149
Metadata
Metadata
Assignees
Labels
No labels