Permalink
Browse files

Added HTML 5 elements to the block parser.

  • Loading branch information...
1 parent c89732d commit a09e65c0e8d5444e292bc76ed460f5e8d25d9a93 @michelf committed Oct 4, 2012
Showing with 10 additions and 1 deletion.
  1. +7 −0 PHP Markdown Readme.text
  2. +3 −1 markdown.php
@@ -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
View
@@ -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;

0 comments on commit a09e65c

Please sign in to comment.