From 1127681d56b8da3b35613ba95dfe88393026ddf5 Mon Sep 17 00:00:00 2001 From: Haralan Dobrev Date: Wed, 13 Aug 2014 23:54:52 +0300 Subject: [PATCH] Allow slashes in HTML attributes --- Parsedown.php | 2 +- test/data/block-level_html.html | 7 ++++++- test/data/block-level_html.md | 8 +++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index f877c48..a109451 100755 --- a/Parsedown.php +++ b/Parsedown.php @@ -619,7 +619,7 @@ class Parsedown protected function identifyMarkup($Line) { - if (preg_match('/^<(\w[\w\d]*)(?:[ ][^>\/]*)?(\/?)[ ]*>/', $Line['text'], $matches)) + if (preg_match('/^<(\w[\w\d]*)(?:[ ][^>]*)?(\/?)[ ]*>/', $Line['text'], $matches)) { if (in_array($matches[1], $this->textLevelElements)) { diff --git a/test/data/block-level_html.html b/test/data/block-level_html.html index ef6ecc0..86ff865 100644 --- a/test/data/block-level_html.html +++ b/test/data/block-level_html.html @@ -5,4 +5,9 @@ _content_ -

paragraph

\ No newline at end of file +

paragraph

+ \ No newline at end of file diff --git a/test/data/block-level_html.md b/test/data/block-level_html.md index 943e183..679832c 100644 --- a/test/data/block-level_html.md +++ b/test/data/block-level_html.md @@ -8,4 +8,10 @@ _content_ -paragraph \ No newline at end of file +paragraph + +