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
RStudio’s Markdown canonicalization, which is provided by Quarto, adds a normalized version of the edited file's name as footnote (and other) identifiers via Pandoc's --id-prefix CLI argument1. This is a good thing, in principle.
But the filename normalization is very imperfect, I recently discovered. It should be extended to also normalize (i.e. remove) the special characters it currently doesn't touch. See below for an example (note that it is by no means exhaustive, I just typed special characters until I lost interest).
Steps to reproduce
Create a text file named such.a <[{(weird)}]>|@#§°\&%$£:;*+"´`'~=filename - – — RIGHT?!.md (this is a totally valid filename on Linux).
Paste some Markdown content including at least one footnote in it.
Open the file in RStudio and click on Visual editor mode, then switch back to Source editor mode and look at the first footnote identifier.
Expected behavior
Quarto should normalize the above filename to the (footnote) ID prefix:
[^such.a-weirdfilename-----right-1]
Actual behavior
Quarto actually normalizes the above filename to the (footnote) ID prefix:
[^such.a-(weird§°£´filename---–-—-right-1]
Your environment
IDE: 2023.12.1+402
OS: Ubuntu 22.04
Quarto check output
Quarto 1.4.553
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.553
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /home/salim/.local/bin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.3.3
Path: /usr/lib/R
LibPaths:
- /home/salim/.software/managed/r
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.46
rmarkdown: 2.26
[✓] Checking Knitr engine render......OK
Bug description
RStudio’s Markdown canonicalization, which is provided by Quarto, adds a normalized version of the edited file's name as footnote (and other) identifiers via Pandoc's
--id-prefix
CLI argument1. This is a good thing, in principle.But the filename normalization is very imperfect, I recently discovered. It should be extended to also normalize (i.e. remove) the special characters it currently doesn't touch. See below for an example (note that it is by no means exhaustive, I just typed special characters until I lost interest).
Steps to reproduce
Create a text file named
such.a <[{(weird)}]>|@#§°\&%$£:;*+"´`'~=filename - – — RIGHT?!.md
(this is a totally valid filename on Linux).Paste some Markdown content including at least one footnote in it.
Open the file in RStudio and click on Visual editor mode, then switch back to Source editor mode and look at the first footnote identifier.
Expected behavior
Quarto should normalize the above filename to the (footnote) ID prefix:
Actual behavior
Quarto actually normalizes the above filename to the (footnote) ID prefix:
Your environment
Quarto check output
Related
Footnotes
I think this is the place where Quarto passes the ID prefix value on to Pandoc. ↩
The text was updated successfully, but these errors were encountered: