Skip to content

Commit

Permalink
Parse h2-h6 as block elements (see commonmark/commonmark-spec#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Nov 22, 2016
1 parent fa16fa3 commit a885f32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Util/RegexHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public static function getHtmlBlockOpenRegex($type)
case HtmlBlock::TYPE_5_CDATA:
return '/^<!\[CDATA\[/';
case HtmlBlock::TYPE_6_BLOCK_ELEMENT:
return '%^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|pre|section|source|title|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)%i';
return '%^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|pre|section|source|title|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)%i';
case HtmlBlock::TYPE_7_MISC_ELEMENT:
$self = self::getInstance();

Expand Down

0 comments on commit a885f32

Please sign in to comment.