Revised matcher to disallow a standalone point. Also reduced catcher group by one.
This commit is contained in:
parent
8fde858541
commit
3ace64bc13
1 changed files with 6 additions and 3 deletions
|
|
@ -1295,9 +1295,12 @@ class MarkdownExtra extends \Michelf\Markdown {
|
|||
(?:~{3,}|`{3,}) # 3 or more tildes/backticks.
|
||||
)
|
||||
[ ]*
|
||||
# #2: class name (optional) and #3: attributes (optional)
|
||||
(?:
|
||||
\.?([-_:a-zA-Z0-9]+)?[ ]*('.$this->id_class_attr_catch_re.')?
|
||||
\.?([-_:a-zA-Z0-9]+) # 2: standalone class name
|
||||
)?
|
||||
[ ]*
|
||||
(?:
|
||||
'.$this->id_class_attr_catch_re.' # 3: Extra attributes
|
||||
)?
|
||||
[ ]* \n # Whitespace and newline following marker.
|
||||
|
||||
|
|
@ -1319,7 +1322,7 @@ class MarkdownExtra extends \Michelf\Markdown {
|
|||
protected function _doFencedCodeBlocks_callback($matches) {
|
||||
$classname =& $matches[2];
|
||||
$attrs =& $matches[3];
|
||||
$codeblock = $matches[5];
|
||||
$codeblock = $matches[4];
|
||||
|
||||
if ($this->code_block_content_func) {
|
||||
$codeblock = call_user_func($this->code_block_content_func, $codeblock, $classname);
|
||||
|
|
|
|||
Loading…
Reference in a new issue