Skip to content

Commit

Permalink
bugfix em and strong with html containing _ inside
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerdic committed Feb 16, 2014
1 parent ac1c8b1 commit 5caabe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Parsedown.php
Expand Up @@ -1109,12 +1109,12 @@ private function parse_span_elements($text, $markers = array(" \n", '![', '&',

private static $strong_regex = array(
'*' => '/^[*]{2}((?:[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s',
'_' => '/^__((?:[^_]|_[^_]*_)+?)__(?!_)/us',
'_' => '/^__((?:[^_](?:<\w[^>]*>)?|_(?:[^_]*?(?:<\w[^>]*>)?)+_)+?)__(?!_)/us',
);

private static $em_regex = array(
'*' => '/^[*]((?:[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s',
'_' => '/^_((?:[^_]|__[^_]*__)+?)_(?!_)\b/us',
'_' => '/^_((?:[^_](?:<\w[^>]*>)?|__(?:[^_]*?(?:<\w[^>]*>)?)+__)+?)_(?!_)\b/us',
);

private static $special_characters = array(
Expand Down

0 comments on commit 5caabe0

Please sign in to comment.