1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

HTML tags should have a name

This commit is contained in:
Aidan Woods 2019-01-27 20:56:57 +00:00
parent 3dd1326ded
commit 30763a0f38
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9
7 changed files with 13 additions and 3 deletions

View File

@ -82,7 +82,7 @@ final class Markup implements ContinuableBlock
return new self($rawLine, 5, self::closes12345TypeMarkup(5, $text)); return new self($rawLine, 5, self::closes12345TypeMarkup(5, $text));
} }
if (\preg_match('/^<[\/]?+(\w*)(?:[ ]*+'.self::REGEX_HTML_ATTRIBUTE.')*+[ ]*+(\/)?>/', $text, $matches)) { if (\preg_match('/^<[\/]?+(\w++)(?:[ ]*+'.self::REGEX_HTML_ATTRIBUTE.')*+[ ]*+(\/)?>/', $text, $matches)) {
$element = \strtolower($matches[1]); $element = \strtolower($matches[1]);
if (\array_key_exists($element, Element::$TEXT_LEVEL_ELEMENTS)) { if (\array_key_exists($element, Element::$TEXT_LEVEL_ELEMENTS)) {

View File

@ -0,0 +1 @@
<p>&lt;&gt;</p>

View File

@ -0,0 +1 @@
<>

View File

@ -0,0 +1 @@
<p>&lt;foo.bar.baz&gt;</p>

View File

@ -0,0 +1 @@
<foo.bar.baz>

View File

@ -1 +1,4 @@
<p>foo <a href="\*"></p> <p>&lt; a&gt;&lt;
foo&gt;&lt;bar/ &gt;
&lt;foo bar=baz
bim!bop /&gt;</p>

View File

@ -1 +1,4 @@
foo <a href="\*"> < a><
foo><bar/ >
<foo bar=baz
bim!bop />