diff --git a/markdown.php b/markdown.php index 6a25c51..54977b0 100644 --- a/markdown.php +++ b/markdown.php @@ -2522,63 +2522,25 @@ class MarkdownExtra_Parser extends Markdown_Parser { } - function doItalicsAndBold($text) { # - # Redefined to change emphasis by underscore behaviour so that it does not + # Redefining emphasis markers so that emphasis by underscore does not # work in the middle of a word. # - # must go first: - $text = preg_replace_callback(array( - '{ - ( # $1: Marker - (? - [^_]+? # Anthing not em markers. - | - # Balence any regular _ emphasis inside. - (? - [^*]+? # Anthing not em markers. - | - # Balence any regular * emphasis inside. - \* (?=\S) (.+?) (?<=\S) \* - | - \* # Allow unbalenced as last resort. - )+? - ) - (?<=\S) \*\* # End mark not preceded by whitespace. - }sx', - ), - array(&$this, '_doItalicAndBold_strong_callback'), $text); - # Then : - $text = preg_replace_callback(array( - '{ ( (? '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S)(? '(?<=\S)(? '(?:(? '(?<=\S)(? '(?<=\S)(?