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

Parsing issues with Sphinx 4.0.1 #700

Closed
outoftardis opened this issue May 18, 2021 · 4 comments
Closed

Parsing issues with Sphinx 4.0.1 #700

outoftardis opened this issue May 18, 2021 · 4 comments
Assignees
Labels
upstream Issue in external software

Comments

@outoftardis
Copy link

With Sphinx 4.0.1, breathe parses Doxygen xml output in a way that results in incorrect markup.

Common configs:

  • breathe==4.30.0
  • sphinx-book-theme==0.1.0

HTML

Here's the html code for the element containing the name of the class:

  1. Correct parsing (Sphinx==3.5.4):
<code class="sig-name descname"><span class="pre">Nutshell</span></code>
  1. Incorrect parsing (Sphinx==4.0.1):
<span class="sig-name descname"><span class="n"><span class="pre">Nutshell</span></span></span>

So basically with the latest version of Sphinx what used to be rendered as inline code is now treated as plain text.

Screenshots

  1. Correct parsing (Sphinx==3.5.4):

image

  1. Incorrect parsing (Sphinx==4.0.1):

image

The example (rst/header) is taken directly from the breathe documentation.

@jakobandersen
Copy link
Collaborator

This is due to a change in Sphinx, and is intentional. The previous code generation was inconsistent in styling and didn't offer options for themes to customize all elements. See sphinx-doc/sphinx#9023 for more details.
From the screenshots it looks like your are using the sphinx_rtd_theme. I guess they might overwrite the default styles provided by Sphinx.

@outoftardis
Copy link
Author

Thanks for the explanation. I'm using sphinx-book-theme, but I also tried furo, and there's the same problem. So this should be fixed on the theme side, right?

@jakobandersen
Copy link
Collaborator

jakobandersen commented May 18, 2021

I'm not familiar with those themes, but yes, the main point of the change was exactly to make it possible to customize completely on the theme side. You can find the relevant CSS in the basic theme at https://github.com/sphinx-doc/sphinx/blob/d6c19126c5ebd788619d491d4e70c949de9fd2ff/sphinx/themes/basic/static/basic.css_t#L511. Note that it was only the C and C++ domains that got updated with new code generation this time, so there is CSS for both the previous and new style of code.

@vermeeren vermeeren self-assigned this May 18, 2021
@vermeeren vermeeren added the upstream Issue in external software label May 18, 2021
@vermeeren
Copy link
Collaborator

Thanks for all the references @jakobandersen , based upon the above this is not specifically a Breathe issue so I will close it to keep the issue tracker a bit neat. Do feel free to continue posting here though if it is deemed useful.

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

No branches or pull requests

3 participants