Fixed some emphasis corner-cases.
This commit is contained in:
parent
221e41a280
commit
8dcbb993ec
2 changed files with 11 additions and 9 deletions
|
|
@ -245,6 +245,8 @@ Version History
|
|||
* Fixed a bug where tags where the name contains an underscore aren't parsed
|
||||
correctly.
|
||||
|
||||
* Fixed some corner-cases mixing underscore-ephasis and asterisk-emphasis.
|
||||
|
||||
|
||||
1.0.1m (21 Jun 2008):
|
||||
|
||||
|
|
|
|||
18
markdown.php
18
markdown.php
|
|
@ -1117,19 +1117,19 @@ class Markdown_Parser {
|
|||
|
||||
|
||||
var $em_relist = array(
|
||||
'' => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?=\S)(?![.,:;]\s)',
|
||||
'*' => '(?<=\S)(?<!\*)\*(?!\*)',
|
||||
'_' => '(?<=\S)(?<!_)_(?!_)',
|
||||
'' => '(?:(?<!\*)\*(?!\*)|(?<!_)_(?!_))(?=\S|$)(?![.,:;]\s)',
|
||||
'*' => '(?<=\S|^)(?<!\*)\*(?!\*)',
|
||||
'_' => '(?<=\S|^)(?<!_)_(?!_)',
|
||||
);
|
||||
var $strong_relist = array(
|
||||
'' => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?=\S)(?![.,:;]\s)',
|
||||
'**' => '(?<=\S)(?<!\*)\*\*(?!\*)',
|
||||
'__' => '(?<=\S)(?<!_)__(?!_)',
|
||||
'' => '(?:(?<!\*)\*\*(?!\*)|(?<!_)__(?!_))(?=\S|$)(?![.,:;]\s)',
|
||||
'**' => '(?<=\S|^)(?<!\*)\*\*(?!\*)',
|
||||
'__' => '(?<=\S|^)(?<!_)__(?!_)',
|
||||
);
|
||||
var $em_strong_relist = array(
|
||||
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?=\S)(?![.,:;]\s)',
|
||||
'***' => '(?<=\S)(?<!\*)\*\*\*(?!\*)',
|
||||
'___' => '(?<=\S)(?<!_)___(?!_)',
|
||||
'' => '(?:(?<!\*)\*\*\*(?!\*)|(?<!_)___(?!_))(?=\S|$)(?![.,:;]\s)',
|
||||
'***' => '(?<=\S|^)(?<!\*)\*\*\*(?!\*)',
|
||||
'___' => '(?<=\S|^)(?<!_)___(?!_)',
|
||||
);
|
||||
var $em_strong_prepared_relist;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue