Skip to content

Commit

Permalink
Added HTML 5 elements to the block parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
michelf committed Oct 4, 2012
1 parent c89732d commit a09e65c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions PHP Markdown Readme.text
Expand Up @@ -200,6 +200,13 @@ expected; (3) the output PHP Markdown actually produced.
Version History
---------------

Current:

* The following HTML 5 elements are treated as block elements when at the
root of an HTML block: `article`, `section`, `nav`, `aside`, `hgroup`,
`header`, `footer`, and `figure`. `svg` too.


1.0.1o (8 Jan 2012):

* Silenced a new warning introduced around PHP 5.3 complaining about
Expand Down
4 changes: 3 additions & 1 deletion markdown.php
Expand Up @@ -382,7 +382,9 @@ function hashHTMLBlocks($text) {
#
$block_tags_a_re = 'ins|del';
$block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'.
'script|noscript|form|fieldset|iframe|math';
'script|noscript|form|fieldset|iframe|math|svg|'.
'article|section|nav|aside|hgroup|header|footer|'
'figure';

# Regular expression for the content of a block tag.
$nested_tags_level = 4;
Expand Down

0 comments on commit a09e65c

Please sign in to comment.