Skip to content

Code formatting with hyphen creates two lines #110

@WalterHof

Description

@WalterHof

Texts formatted as code that contain a hyphen are displayed on two lines in the PDF. For example: zypper ps -s is the -s under the zypper ps. Everything is correct in the HTML output.

The code:

SuSE - ``zypper ps -s``
-----------------------

``zypper ps -s`` zeigt Dienste die neu gestartet werden sollen.

.. code-block:: bash
   :linenos:
   :caption: SuSE prüfen mit ``zypper ps -s``

    zypper ps -s

The PDF output:

Image

You see 3 times where the -s is below zypper ps.

The HTML output is OK:

Image

Environment:

sphinx: 8.1.3
sphinx_simplepdf: 1.6.0
weasyprint: 63.1
python 3.13.1
Windows 11

Any idea what I am doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions