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

Allow slashes in HTML attributes

This commit is contained in:
Haralan Dobrev 2014-08-13 23:54:52 +03:00
parent e33ac1c56e
commit 1127681d56
3 changed files with 14 additions and 3 deletions

View File

@ -619,7 +619,7 @@ class Parsedown
protected function identifyMarkup($Line) 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)) if (in_array($matches[1], $this->textLevelElements))
{ {

View File

@ -5,4 +5,9 @@
_content_ _content_
</div> </div>
</div> </div>
<p>paragraph</p> <p>paragraph</p>
<style type="text/css">
p {
color: red;
}
</style>

View File

@ -8,4 +8,10 @@ _content_
</div> </div>
</div> </div>
paragraph paragraph
<style type="text/css">
p {
color: red;
}
</style>