From 0e66b5cc0ea904851e189968b29ef3305ae6dff0 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Wed, 22 Apr 2020 17:36:58 +0200 Subject: [PATCH] Treat
and as block level. `
` and `` elements should never be wrapped in `

`. See michelf/php-markdown#329. Signed-off-by: Thomas Hochstein --- serendipity_event_markdown/ChangeLog | 6 ++++++ serendipity_event_markdown/lib/Michelf/Markdown.php | 2 +- serendipity_event_markdown/lib/Michelf/MarkdownExtra.php | 2 +- serendipity_event_markdown/markdown.php | 2 +- serendipity_event_markdown/markdown_extra.php | 2 +- serendipity_event_markdown/serendipity_event_markdown.php | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/serendipity_event_markdown/ChangeLog b/serendipity_event_markdown/ChangeLog index 62680219..f5336e96 100644 --- a/serendipity_event_markdown/ChangeLog +++ b/serendipity_event_markdown/ChangeLog @@ -1,3 +1,9 @@ +Version 1.29: +============= +Changes by Thomas Hochstein + +- Treat
and as block level. + Version 1.28: ============= Changes by Thomas Hochstein diff --git a/serendipity_event_markdown/lib/Michelf/Markdown.php b/serendipity_event_markdown/lib/Michelf/Markdown.php index e4c2c236..b9964d29 100644 --- a/serendipity_event_markdown/lib/Michelf/Markdown.php +++ b/serendipity_event_markdown/lib/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/serendipity_event_markdown/lib/Michelf/MarkdownExtra.php b/serendipity_event_markdown/lib/Michelf/MarkdownExtra.php index a8f7f2c5..8b3f06eb 100644 --- a/serendipity_event_markdown/lib/Michelf/MarkdownExtra.php +++ b/serendipity_event_markdown/lib/Michelf/MarkdownExtra.php @@ -299,7 +299,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/serendipity_event_markdown/markdown.php b/serendipity_event_markdown/markdown.php index 31e5991a..764948f4 100644 --- a/serendipity_event_markdown/markdown.php +++ b/serendipity_event_markdown/markdown.php @@ -389,7 +389,7 @@ class Markdown_Parser { $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. 'script|noscript|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/serendipity_event_markdown/markdown_extra.php b/serendipity_event_markdown/markdown_extra.php index 0edba0f3..fc80729d 100644 --- a/serendipity_event_markdown/markdown_extra.php +++ b/serendipity_event_markdown/markdown_extra.php @@ -421,7 +421,7 @@ class Markdown_Parser { $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. 'script|noscript|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/serendipity_event_markdown/serendipity_event_markdown.php b/serendipity_event_markdown/serendipity_event_markdown.php index 1b226710..b7506384 100644 --- a/serendipity_event_markdown/serendipity_event_markdown.php +++ b/serendipity_event_markdown/serendipity_event_markdown.php @@ -31,7 +31,7 @@ class serendipity_event_markdown extends serendipity_event 'smarty' => '2.6.7', 'php' => '5.3.0' )); - $propbag->add('version', '1.28'); + $propbag->add('version', '1.29'); $propbag->add('cachable_events', array('frontend_display' => true)); $propbag->add('event_hooks', array( 'frontend_display' => true,