You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recently introduced footnote support via param footnotes does not work as one would expect for commonmark::markdown_text(). For all other Markdown features (like emphasizing, links etc.), they are stripped by commonmark::markdown_text() since regular text has no notion of markup.
But the footnotes remain:
md<-"Text *emphasized* and **bold**, with [inline link](https://to.some.where/), [reference link][ref] and footnote[^fn].\n\n[ref]: https://fsf.org\n\n[^fn]: A note.\n"
cat(md)
#> Text *emphasized* and **bold**, with [inline link](https://to.some.where/), [reference link][ref] and footnote[^fn].#> #> [ref]: https://fsf.org#> #> [^fn]: A note.# without footnote parsingmd|>commonmark::markdown_text(footnotes=F) |> cat()
#> Text emphasized and bold, with inline link, reference link and footnote[^fn].#> #> [^fn]: A note.# with footnote parsingmd|>commonmark::markdown_text(footnotes=T) |> cat()
#> Text emphasized and bold, with inline link, reference link and footnote[^1].#> #> [^1]: A note.
I am not sure actually. Footnotes are not described in the gfm spec. I can imagine they are considered content, not markup, and hence get retained in plain text.
The recently introduced footnote support via param
footnotes
does not work as one would expect forcommonmark::markdown_text()
. For all other Markdown features (like emphasizing, links etc.), they are stripped bycommonmark::markdown_text()
since regular text has no notion of markup.But the footnotes remain:
Created on 2023-03-29 with reprex v2.0.2
Is this really the intended behaviour?
The text was updated successfully, but these errors were encountered: