executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
265 stars 68 forks source link

πŸ› FIX: nested parsing of tab labels #102

Closed foster999 closed 3 years ago

foster999 commented 3 years ago

v2.0.0 stopped parsing reST content within tab labels. Re-implemented here. This feature was already included in tests, so test regression is also fixed here.

The example:

.. tabs::

   .. tab:: :math:`\frac{ \sum_{t=0}^{N}f(t,k) }{N}`

      Some content

Produces:

image

Fixes #100 and fixes #101

codecov[bot] commented 3 years ago

Codecov Report

Merging #102 (394594b) into master (0ce888a) will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
+ Coverage   94.02%   94.08%   +0.05%     
==========================================
  Files           1        1              
  Lines         201      203       +2     
==========================================
+ Hits          189      191       +2     
  Misses         12       12              
Flag Coverage Ξ”
pytests 94.08% <100.00%> (+0.05%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Ξ”
sphinx_tabs/tabs.py 94.08% <100.00%> (+0.05%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 0ce888a...4569ffe. Read the comment docs.

foster999 commented 3 years ago

Hey @Daltz333, please could you take a look at this if you get a moment?

I'll bump the version once I get time to take a look at #99

foster999 commented 3 years ago

Thanks!

If interested, the main difference is that the tab labels are now correctly parsed into HTML, rather than being left as raw reStructuredText. So the reST **I'm bold** is parsed to <strong>I'm bold</strong>.