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

2.0.16 changes id attributes in html generated from .rst #146

Closed
abchenson opened this issue Nov 10, 2017 · 2 comments · Fixed by #147
Closed

2.0.16 changes id attributes in html generated from .rst #146

abchenson opened this issue Nov 10, 2017 · 2 comments · Fixed by #147
Labels

Comments

@abchenson
Copy link

Hi,firstly thanks for the 2.0.16 fix! On 2.0.16, the build runs but, in html generated from an .rst file, where I was previously seeing the following:

<div class="section" id="References">
<h1>References<a class="headerlink" href="#References" title="Permalink to this headline">¶</a></h1>

I now see

<div class="section" id="references">
<h1>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h1>

I.e. the id has been capitalised. Installing 2.0.14 and 2.0.16 back and forth does toggle this behaviour so it's definitely nbsphinx that's doing it, even though this is not in an .ipynb file. Is this something to do with the 2.0.15 version note "Links to subsections are now possible in all source files"?
This might seem trivial but several typical test processes make use of these ids. In our case it broke some integration tests.
A good resolution for us would be either (a) to reverse it and guarantee that nbsphinx will not make changes in html generated from .rst files, or (b) to know very explicitly what nbsphinx is doing to id attributes (and have any changes to this flagged explicitly in release notes) so that we can feel secure using the ids when writing tests.
Many thanks in advance.

@mgeier
Copy link
Member

mgeier commented Nov 10, 2017

Thanks for the report!

Sorry, I should have noticed that. And I indeed consider it a bug.
As it is now, just by loading the nbsphinx extension, the HTML output of totally unrelated RST files is changed. That wasn't my intention.

And yes, this was introduced with #135, where we started to use a transformation to generate Sphinx labels on all source files instead of only on Jupyter notebooks.

I've tried to fix this in #147, can you please check if that works for you?

This might seem trivial

Not to me.

(a) to reverse it and guarantee that nbsphinx will not make changes in html generated from .rst files

That's what I'm trying to do in #147, but "guarantee" is a very strong word ... if something changes in the future, just let me know!

@mgeier mgeier added the bug label Nov 10, 2017
mgeier added a commit that referenced this issue Nov 10, 2017
mgeier added a commit that referenced this issue Nov 10, 2017
@abchenson
Copy link
Author

Excellent -- yes 0.2.17 corrects this for us. Thanks for the concern and rapid correction.

mgeier added a commit that referenced this issue Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants