Skip to content

Images and math in tab headings broken in 2.0.0 #101

@jmd-dk

Description

@jmd-dk

Describe the bug

Placing images and math in tab headings/titles does not work in version 2.0.0.

To Reproduce / Expected behavior

I'm not sure if it is (was) a deliberate feature, but prior to 2.0.0 one could have tabs like what is shown here. The Sphinx code generating this is of the form

.. tabs::

   .. tab:: |linux| :math:`\,\,` Linux

      Tab 1 text...

   .. tab:: |windows| :math:`\,\,` Windows

      Tab 2 text

where |linux| and |windows| are images defined as

.. |linux| image:: /_static/linux.png
   :height: 35px

.. |windows| image:: /_static/windows.png
   :height: 35px

I use :math: simply to produce some whitespace between the images and the titles.

With sphinx-tabs 2.0.0 we get the following:
tabs
Neither the image nor the math is rendered. It's as though the RST-text isn't getting parsed but just used raw, as is.

Environment

  • Python 3.9.1
  • Sphinx 3.4.1
  • Linux Mint 20

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions