diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php
index 108e5d1..d25b4ec 100644
--- a/Michelf/MarkdownExtra.php
+++ b/Michelf/MarkdownExtra.php
@@ -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;
}
diff --git a/test/resources/php-markdown-extra.mdtest/Footnotes.text b/test/resources/php-markdown-extra.mdtest/Footnotes.text
index c54e436..95b5ea8 100644
--- a/test/resources/php-markdown-extra.mdtest/Footnotes.text
+++ b/test/resources/php-markdown-extra.mdtest/Footnotes.text
@@ -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
diff --git a/test/resources/php-markdown-extra.mdtest/Footnotes.xhtml b/test/resources/php-markdown-extra.mdtest/Footnotes.xhtml
index 2e16a92..fe0a464 100644
--- a/test/resources/php-markdown-extra.mdtest/Footnotes.xhtml
+++ b/test/resources/php-markdown-extra.mdtest/Footnotes.xhtml
@@ -30,10 +30,6 @@ footnote test11

This is not a valid footnote name because it has whitespace.[^invalid fn]
-