-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Unicode characters in headers are not stripped from identifier when +auto_identifiers
#10816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
One workaround is to use |
Note that the character ① does satisfy Perhaps the analogous function typst uses does not classify it as alphanumeric? I'd have to know the details. Maybe someone who is familiar with the typst code base could point me to the right place in the code. |
I note that the rust documentation actually has this example: assert!('①'.is_alphanumeric()); So the typst code must not be using @laurmaedje can you advise us on the correct restrictions for labels? (Summary of the above: |
My search lead me to It seems they use
From this crate: https://docs.rs/unicode-ident/latest/unicode_ident So only XID_Continue characters from the UNICODE spec for Default identifier are accepted And > console.log(/\p{XID_Continue}/u.test("①"))
false I find also reference to this in Rust references: https://doc.rust-lang.org/reference/identifiers.html |
Table 2 here is helpful: |
This header is using U+2460 character, which gets kept into the identifier created for the Header.
And it makes Typst rendering fails for example, as it leads to this typ content
For typst
I would have expected the
+auto_identifiers
extension (https://pandoc.org/MANUAL.html#extension-auto_identifiers) to also support only letters as ANSI letters, when it saysI also tried LaTeX and it will no prevent rendering as the
.tex
content isHowever, it will not render the
①
in document but only in the TOC linkShould Unicode chars be dropped for identifier creation? Or at least for Typst where this is not supported like with LaTeX ?
Current workaround to this
Manually setting the id is the solution here.
Originally posted in quarto-dev/quarto-cli#12660
The text was updated successfully, but these errors were encountered: