Escaping of character classes begining with "." to avoid new PHP warning about Posix classes.
This commit is contained in:
parent
8dcbb993ec
commit
1faa8f2198
1 changed files with 5 additions and 5 deletions
10
markdown.php
10
markdown.php
|
|
@ -926,7 +926,7 @@ class Markdown_Parser {
|
|||
|
||||
# Re-usable patterns to match list item bullets and number markers:
|
||||
$marker_ul_re = '[*+-]';
|
||||
$marker_ol_re = '\d+[.]';
|
||||
$marker_ol_re = '\d+[\.]';
|
||||
$marker_any_re = "(?:$marker_ul_re|$marker_ol_re)";
|
||||
|
||||
$markers_relist = array(
|
||||
|
|
@ -987,7 +987,7 @@ class Markdown_Parser {
|
|||
function _doLists_callback($matches) {
|
||||
# Re-usable patterns to match list item bullets and number markers:
|
||||
$marker_ul_re = '[*+-]';
|
||||
$marker_ol_re = '\d+[.]';
|
||||
$marker_ol_re = '\d+[\.]';
|
||||
$marker_any_re = "(?:$marker_ul_re|$marker_ol_re)";
|
||||
|
||||
$list = $matches[1];
|
||||
|
|
@ -1117,17 +1117,17 @@ class Markdown_Parser {
|
|||
|
||||
|
||||
var $em_relist = array(
|
||||
'' => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?=\S|$)(?![.,:;]\s)',
|
||||
'' => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?=\S|$)(?![\.,:;]\s)',
|
||||
'*' => '(?<=\S|^)(?<!\*)\*(?!\*)',
|
||||
'_' => '(?<=\S|^)(?<!_)_(?!_)',
|
||||
);
|
||||
var $strong_relist = array(
|
||||
'' => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?=\S|$)(?![.,:;]\s)',
|
||||
'' => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?=\S|$)(?![\.,:;]\s)',
|
||||
'**' => '(?<=\S|^)(?<!\*)\*\*(?!\*)',
|
||||
'__' => '(?<=\S|^)(?<!_)__(?!_)',
|
||||
);
|
||||
var $em_strong_relist = array(
|
||||
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?=\S|$)(?![.,:;]\s)',
|
||||
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?=\S|$)(?![\.,:;]\s)',
|
||||
'***' => '(?<=\S|^)(?<!\*)\*\*\*(?!\*)',
|
||||
'___' => '(?<=\S|^)(?<!_)___(?!_)',
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue