kai687 / sphinxawesome-theme

Create beautiful and awesome websites with the Sphinx documentation generator.
https://sphinxawesome.xyz
MIT License
113 stars 26 forks source link

Inconsistent Bold Rendering #1681

Closed fxwiegand closed 8 months ago

fxwiegand commented 9 months ago

Hi, thanks for creating this great theme.

When attempting to apply bold formatting to specific words in a reStructuredText document, the rendering appears inconsistent. The intention is to bold only the words "align" and "alioth," but the formatting renders the entire section in bold instead.

**align**ments combined with the star **alioth**

This is how it should be rendered:

alignments combined with the star alioth

Docs look like this:

Bildschirmfoto 2024-01-29 um 15 57 43
kai687 commented 8 months ago

Hi and thanks for your kind words.

This isn't related to the theme, but rather the reStructuredText parsing. You can confirm this by using the default Sphinx theme, you should see the same.

Technically, this isn't even related to Sphinx, but docutils.

You'll find the explanation in point 6 and 7 of the inline markup recognition rules.

If you want to support this with Sphinx, the following might help:

In the same directory as your Sphinx configuration conf.py, create a new file docutils.conf with the following content:

[restructuredtext parser]
character_level_inline_markup = true

Now, building your docs should show the correct markup.

fxwiegand commented 8 months ago

Thank you very much for the extensive answer! I have it working now 👍