Skip to content
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

Surrounding footnote references in square brackets? #644

Open
nyanpasu64 opened this issue May 7, 2023 · 0 comments
Open

Surrounding footnote references in square brackets? #644

nyanpasu64 opened this issue May 7, 2023 · 0 comments

Comments

@nyanpasu64
Copy link

Wikipedia/MediaWiki surrounds footnote references in square brackets when generating HTML output (eg. [1]). Currently, pulldown-cmark's pub mod html (and Zola using it) only output the number itself, which is small and difficult to click, and makes adjacent footnote numbers run together unless I add a space in between:

https://github.com/raphlinus/pulldown-cmark/blob/5c7881c45c1b9cb35e8c9417f09521f7a517b8cf/src/html.rs#L120-L128

I can use CSS ::before/after { content: "[ ]" } to add visual brackets to separate footnotes. However, this does not affect the text you can select and copy elsewhere. Copy-pasting the text as HTML causes the problem to reappear, and when copy-pasting as plain-text, all footnotes run together with body text.

Is it possible to add an option to add [ and ] (or alternatively, configurable characters) around footnotes when converting to HTML?

nyanpasu64 added a commit to nyanpasu64/tale-zola that referenced this issue May 12, 2023
Unfortunately this is not possible in HTML, and adding square brackets
in CSS doesn't fix copy-pasting text.

pulldown-cmark/pulldown-cmark#644
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants