Skip to content

Reference to heading with literal is not rendered as literal #6522

@jessetan

Description

@jessetan

Describe the bug
Using a :ref: to a label of a heading that contains a literal is not rendered as a literal (monospaced font)

To Reproduce
Steps to reproduce the behavior:

###
Bla
###

.. _mylabel:

This header has a ``literal``
=============================

This is a reference to the header above :ref:`mylabel`

Produces the following HTML and PDF:

Screen Shot 2019-06-25 at 16 06 51

Screen Shot 2019-06-25 at 16 06 59

Expected behavior
The word "literal" in the reference to be in a monospaced font (as well as in italics in PDF)

Environment info

  • Sphinx version: 1.8.5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions