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

example.md breaks Sphinx 8.1.0 (and probably earlier versions too) #83

Open
juliangilbey opened this issue Dec 25, 2024 · 1 comment
Open

Comments

@juliangilbey
Copy link
Contributor

Description

When building the documentation with Sphinx 8.1.3, the build breaks with a bizarre warning/error message:

$ sphinx-build -W -b html docs docs/_build/html
Running Sphinx v8.1.3
root = PosixPath('/home/jdg/debian/spyder-packages/jupyter-server/build-area/sphinx-mdinclude-0.6.2')
loading translations [en]... done
making output directory... done
loading intersphinx inventory 'python' from /usr/share/doc/python3/html/objects.inv ...
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 4 source files that are out of date
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [ 25%] changelog
reading sources... [ 50%] example
reading sources... [ 75%] included
reading sources... [100%] index

/home/jdg/debian/spyder-packages/jupyter-server/build-area/sphinx-mdinclude-0.6.2/docs/example.md:233: WARNING: Footnote [#] is not referenced. [ref.footnote]
/home/jdg/debian/spyder-packages/jupyter-server/build-area/sphinx-mdinclude-0.6.2/docs/example.md:234: WARNING: Footnote [#] is not referenced. [ref.footnote]
looking for now-outdated files... none found
[...]
build finished with problems, 2 warnings (with warnings treated as errors).

The bizarre nature of the error is that there is no such footnote in the file. Also, if I look at the example.html file generated by an older version of Sphinx (7.4.7), it seems possibly broken (the first two markdown footnotes are not hyperlinked):

<section id="footnote">
<h3>Footnote<a class="headerlink" href="#footnote" title="Link to this heading"></a></h3>
<p>Footnote[#fn-1]_ and footnote[#fn-KEY]_ with markdown.</p>
<p>Footnote with reST<a class="footnote-reference brackets" href="#a" id="id3" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>.</p>
<!-- footnote definition --><aside class="footnote-list brackets">
<aside class="footnote brackets" id="a" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id3">1</a><span class="fn-bracket">]</span></span>
<p>reST footnote</p>
</aside>
<aside class="footnote brackets" id="fn-1" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span>2<span class="fn-bracket">]</span></span>
<p>footnote 1</p>
</aside>
<aside class="footnote brackets" id="fn-key" role="doc-footnote">
<span class="label"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></span>
<p>footnote key</p>
</aside>
</aside>
</section>
</section>
</section>

The cause certainly seems to be the Markdown style footnotes, but I have no idea why they are so problematic.

@juliangilbey
Copy link
Contributor Author

Ah, found the problem:

Footnote[^1] and footnote[^key] with markdown.

does not have spaces before the footnote links; it should read Footnote [^1] and footnote [^key] with markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant