Fixing two-space-at-end-of-line hard breaks inside of HTML blocks expecting span-level content.
- The code should insert the empty-string hash after the new line (at the beginning of the next line) true to its comment above. Instead it was added after, probably with various side effects such as breaking hard breaks. Fix #252
This commit is contained in:
parent
8623708448
commit
05747a4749
2 changed files with 5 additions and 1 deletions
|
|
@ -466,7 +466,7 @@ class MarkdownExtra extends \Michelf\Markdown {
|
|||
// after each newline to prevent triggering any block element.
|
||||
if ($span) {
|
||||
$void = $this->hashPart("", ':');
|
||||
$newline = "$void\n";
|
||||
$newline = "\n$void";
|
||||
$parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -192,6 +192,10 @@ Current Version:
|
|||
code block equivalent, there is no syntax for specifying a language.
|
||||
Credits to styxit for the implementation.
|
||||
|
||||
* Fixed a Markdwon Extra issue where two-space-at-end-of-line hard breaks
|
||||
wouldn't work inside of HTML block elements such as `<p markdown="1">`
|
||||
where the element expects only span-level content.
|
||||
|
||||
* In the parser code, switched to PHPDoc comment format. Thanks to
|
||||
Robbie Averill for the help.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue