diff --git a/markdown.php b/markdown.php index 2e0ae85..02c3f5b 100644 --- a/markdown.php +++ b/markdown.php @@ -1816,7 +1816,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { if (empty($attr)) return ""; # Split on components - preg_match_all("/[.#][-_:a-zA-Z0-9]+/", $attr, $matches); + preg_match_all('/[#.][-_:a-zA-Z0-9]+/', $attr, $matches); $elements = $matches[0]; # handle classes and ids (only first id taken into account) @@ -1968,7 +1968,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { [ ]{0,'.($indent+3).'}~{3,} [ ]* (?: - [.]?[-_:a-zA-Z0-9]+ # standalone class name + \.?[-_:a-zA-Z0-9]+ # standalone class name | '.$this->id_class_attr_nocatch_re.' # extra attributes )? @@ -2564,7 +2564,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { (?>\A\n?|\n\n+) # leading line ( # definition terms = $1 [ ]{0,'.$less_than_tab.'} # leading whitespace - (?![:][ ]|[ ]) # negative lookahead for a definition + (?!\:[ ]|[ ]) # negative lookahead for a definition # mark (colon) or more whitespace. (?> \S.* \n)+? # actual term (not whitespace). ) @@ -2578,12 +2578,12 @@ class MarkdownExtra_Parser extends Markdown_Parser { \n(\n+)? # leading line = $1 ( # marker space = $2 [ ]{0,'.$less_than_tab.'} # whitespace before colon - [:][ ]+ # definition mark (colon) + \:[ ]+ # definition mark (colon) ) ((?s:.+?)) # definition text = $3 (?= \n+ # stop at next definition mark, (?: # next term or end of text - [ ]{0,'.$less_than_tab.'} [:][ ] | + [ ]{0,'.$less_than_tab.'} \:[ ] |