File tree 1 file changed +8
-4
lines changed 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ impl Page {
229
229
self . summary = res
230
230
. summary_len
231
231
. map ( |l| & res. body [ 0 ..l] )
232
- . map ( |s| FOOTNOTES_RE . replace ( s, "" ) . into_owned ( ) ) ;
232
+ . map ( |s| FOOTNOTES_RE . replace_all ( s, "" ) . into_owned ( ) ) ;
233
233
self . content = res. body ;
234
234
self . toc = res. toc ;
235
235
self . external_links = res. external_links ;
@@ -515,13 +515,17 @@ Hello world
515
515
+++
516
516
This page use <sup>1.5</sup> and has footnotes, here's one. [^1]
517
517
518
+ Here's another. [^2]
519
+
518
520
<!-- more -->
519
521
520
- And here's another. [^2 ]
522
+ And here's another. [^3 ]
521
523
522
524
[^1]: This is the first footnote.
523
525
524
- [^2]: This is the second footnote."#
526
+ [^2]: This is the secund footnote.
527
+
528
+ [^3]: This is the third footnote."#
525
529
. to_string ( ) ;
526
530
let res = Page :: parse ( Path :: new ( "hello.md" ) , & content, & config, & PathBuf :: new ( ) ) ;
527
531
assert ! ( res. is_ok( ) ) ;
@@ -536,7 +540,7 @@ And here's another. [^2]
536
540
. unwrap ( ) ;
537
541
assert_eq ! (
538
542
page. summary,
539
- Some ( "<p>This page use <sup>1.5</sup> and has footnotes, here\' s one. </p>\n " . to_string( ) )
543
+ Some ( "<p>This page use <sup>1.5</sup> and has footnotes, here\' s one. </p>\n <p>Here's another. </p> \n " . to_string( ) )
540
544
) ;
541
545
}
542
546
You can’t perform that action at this time.
0 commit comments