rollback change to footnote names

invalidating spaces in footnote names, while technically correct from
HTML standards point of view is an unnecessarily burdensome breaking
change at this time
This commit is contained in:
Sunny Walker 2018-10-12 14:27:54 -10:00
parent 79a2446b57
commit 148a5f41e3
3 changed files with 1 additions and 11 deletions

View file

@ -1645,7 +1645,7 @@ class MarkdownExtra extends \Michelf\Markdown {
*/
protected function doFootnotes($text) {
if (!$this->in_anchor) {
$text = preg_replace('{\[\^(\S+?)\]}', "F\x1Afn:\\1\x1A:", $text);
$text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text);
}
return $text;
}

View file

@ -68,9 +68,3 @@ Footnotes mixed with images[^image-mixed]
[img6]: images/MGR-1800-travel.jpeg "Travel Speeds in 1800"
[^image-mixed]: Footnote Content
[img7]: images/MGR-1830-travel.jpeg "Travel Speeds in 1830"
- - -
This is not a valid footnote name because it has whitespace.[^invalid fn]
[^invalid fn]: an invalid footnote name

View file

@ -30,10 +30,6 @@ footnote test<sup id="fnref:reference"><a href="#fn:reference" class="footnote-r
<p>Footnotes mixed with images<sup id="fnref:image-mixed"><a class="footnote-ref" role="doc-noteref" href="#fn:image-mixed">11</a></sup><img alt="1800 Travel" src="images/MGR-1800-travel.jpeg" title="Travel Speeds in 1800"/><img alt="1830 Travel" src="images/MGR-1830-travel.jpeg" title="Travel Speeds in 1830"/></p>
<hr/>
<p>This is not a valid footnote name because it has whitespace.[^invalid fn]</p>
<div class="footnotes" role="doc-endnotes">
<hr />
<ol>