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

Double brackets in footnote references (docutils 0.18?) #10522

Closed
mgeier opened this issue Jun 4, 2022 · 5 comments
Closed

Double brackets in footnote references (docutils 0.18?) #10522

mgeier opened this issue Jun 4, 2022 · 5 comments

Comments

@mgeier
Copy link
Contributor

mgeier commented Jun 4, 2022

Describe the bug

See #10415 (comment), that issue also has screenshots.

How to Reproduce

x

Expected behavior

No response

Your project

x

Screenshots

No response

OS

x

Python version

x

Sphinx version

x

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

@mgeier mgeier added the type:bug label Jun 4, 2022
@mgeier
Copy link
Contributor Author

mgeier commented Jun 4, 2022

Very annoying new bug report template, BTW.

@AA-Turner
Copy link
Member

My reply from #10457

One set [of brackets] is in the HTML source, <span class="fn-bracket">[</span>. The other is added in CSS:

a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}

We should only use the CSS brackets if span.fn-bracket is absent.

A

@AA-Turner
Copy link
Member

@AA-Turner
Copy link
Member

Quick reproducer:

import shutil
from pathlib import Path

from sphinx.cmd.make_mode import run_make_mode


def write(filename, text): Path(filename).write_text(text, encoding="utf-8")


write("conf.py", '''\
html_theme = "basic"
''')

write("index.rst", '''\
Imagine you have Spanish translations [2]_.

.. [2] Because nobody expects the Spanish Inquisition!
''')

shutil.rmtree("_build", ignore_errors=True)
run_make_mode(["html", ".", "_build", "-T", "-W"])

A

@AA-Turner
Copy link
Member

Can't reproduce on Docutils 0.17.1, this is a 0.18.* issue.

@AA-Turner AA-Turner added this to the 5.0.2 milestone Jun 4, 2022
@tk0miya tk0miya closed this as completed Jun 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants