Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added HTML 5 elements to the block parser.

  • Loading branch information...
commit a09e65c0e8d5444e292bc76ed460f5e8d25d9a93 1 parent c89732d
@michelf authored
Showing with 10 additions and 1 deletion.
  1. +7 −0 PHP Markdown Readme.text
  2. +3 −1 markdown.php
View
7 PHP Markdown Readme.text
@@ -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
4 markdown.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.