From 39642727fced244d50aa510605de1f7652244d9a Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Mon, 21 Jan 2013 07:41:43 -0500 Subject: [PATCH] Removed things that are sometime confused as POSIX collating elements by PCRE (depends on PCRE version used). --- markdown.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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.'} \:[ ] |
| \z ) ) @@ -2639,7 +2639,7 @@ class MarkdownExtra_Parser extends Markdown_Parser { ) [ ]* (?: - [.]?([-_:a-zA-Z0-9]+) # 2: standalone class name + \.?([-_:a-zA-Z0-9]+) # 2: standalone class name | '.$this->id_class_attr_catch_re.' # 3: Extra attributes )?