Skip to content

Commit d896ca8

Browse files
committed
hint to a missing markdown=1 attribute
revert adding "frame" to void-elements
1 parent 01627bf commit d896ca8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

vendor/erusev/parsedown-extra/ParsedownExtra.php

+2
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ protected function processTag($elementMarkup) # recursive
635635
if ($errors)
636636
{
637637
$errormessage = "<h1>HTML-parser error:</h1><br>";
638+
$errormessage .= "The input was interpret as HTML - did you miss the <code>markdown=1</code> attribute?<br>";
638639
foreach ($errors as $error) {
639640
$errormessage .= "Line: " . $error->line . " - " . $error->message;
640641
$errormessage .= '<br>';
@@ -645,6 +646,7 @@ protected function processTag($elementMarkup) # recursive
645646
if (!isset($DOMDocument->firstChild->firstChild->firstChild))
646647
{
647648
$errormessage = "<h1>General HTML-parser error:</h1><br>";
649+
$errormessage .= "The input was interpret as HTML - did you miss the <code>markdown=1</code> attribute?<br>";
648650
$errormessage .= "Input:<pre><code>" . htmlspecialchars($elementMarkup) . "</code></pre>";
649651
$errormessage .= "Output:<pre><code>" . htmlspecialchars($DOMDocument->saveHTML()) . "</code></pre>";
650652
return $errormessage;

vendor/erusev/parsedown/Parsedown.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ static function instance($name = 'default')
19771977
protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*+(?:\s*+=\s*+(?:[^"\'=<>`\s]+|"[^"]*+"|\'[^\']*+\'))?+';
19781978

19791979
protected $voidElements = array(
1980-
'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'frame'
1980+
'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source'
19811981
);
19821982

19831983
protected $textLevelElements = array(

0 commit comments

Comments
 (0)