diff --git a/Michelf/Markdown.php b/Michelf/Markdown.php index 43b3c79..9cf4c77 100644 --- a/Michelf/Markdown.php +++ b/Michelf/Markdown.php @@ -354,7 +354,7 @@ class Markdown implements MarkdownInterface { $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. 'script|noscript|style|form|fieldset|iframe|math|svg|'. 'article|section|nav|aside|hgroup|header|footer|'. - 'figure'; + 'figure|details|summary'; // Regular expression for the content of a block tag. $nested_tags_level = 4; diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index cf5b788..462adab 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -345,7 +345,7 @@ class MarkdownExtra extends \Michelf\Markdown { * Tags that are always treated as block tags * @var string */ - protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|figure'; + protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|figure|details|summary'; /** * Tags treated as block tags only if the opening tag is alone on its line diff --git a/test/resources/php-markdown.mdtest/Inline HTML (Simple).html b/test/resources/php-markdown.mdtest/Inline HTML (Simple).html index 1451d62..efb6763 100644 --- a/test/resources/php-markdown.mdtest/Inline HTML (Simple).html +++ b/test/resources/php-markdown.mdtest/Inline HTML (Simple).html @@ -14,6 +14,13 @@
+

Details and Summary:

+ +
+ Some details +

More info about the details.

+
+

Regression:

diff --git a/test/resources/php-markdown.mdtest/Inline HTML (Simple).text b/test/resources/php-markdown.mdtest/Inline HTML (Simple).text
index 359b622..7b67dde 100644
--- a/test/resources/php-markdown.mdtest/Inline HTML (Simple).text	
+++ b/test/resources/php-markdown.mdtest/Inline HTML (Simple).text	
@@ -14,6 +14,13 @@ Hr's:
 
+Details and Summary: + +
+ Some details +

More info about the details.

+
+ Regression: