-
Notifications
You must be signed in to change notification settings - Fork 575
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
Section links when converting Markdown to RST #1627
Comments
I think I found the problem and it seems a bug: all the section links are generated in HTML like this, <h3>A1<a class="headerlink" href="#a1" title="Permalink to this headline">¶</a></h3> but the correspondent one in the table of contents is, <li><p><a class="reference external" href="#A1">A1</a></p></li> which is wrong. <li><p><a class="reference external" href="#a1">A1</a></p></li> it works same with the table of contents, the section link is <p><a class="reference external" href="#Table-of-contents">back to top</a></p> while the actual header is <h2>Table of contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h2> so it seems that the conversion puts all the header in lower-case, killing the links I would open a proper "bug" issue, since I cannot change the labeling here, but I'll wait a bit to see if anyone has something else to say, |
I found this was already addressed on pandoc's side |
by the way if the RST output is correct as it is, it could be also a problem in using sphinx |
That does look to be a bug someone needs to fix in the templating. I'm not sure if something changed in sphinx to make it more strict or if we had issues with the output for some time. |
Not sure if is it a bug or something I didn't understand.
I have a Jupyter notebook in which I made a markdown table of contents like the following,
and then I call each section like so,
If I use the notebook as it is it works well, but I have the need to convert it to RST in my sphinx-based documentation (using directly HTML seemed more difficult and I didn't want to add to my repo the executed notebooks anymore).
So I installed pandoc and then did something like
jupyter nbconvert --to rst Untitled.ipynb
, so I have myUntitled.rst
which get reproduced in my docs.Problem is, all the links do not work anymore.
In the RST file I see the links as, e.g.
and in the html page,
I am not an HTML expert, but at least the RST link seems to me a web link and not a section (or
:ref
) link.Am I right? Or am I missing something?
The text was updated successfully, but these errors were encountered: