Skip to content

🐛 FIX: nested parsing of tab labels#102

Merged
foster999 merged 1 commit intomasterfrom
nested-parse-titles
Feb 6, 2021
Merged

🐛 FIX: nested parsing of tab labels#102
foster999 merged 1 commit intomasterfrom
nested-parse-titles

Conversation

@foster999
Copy link
Copy Markdown
Collaborator

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
Copy link
Copy Markdown

codecov bot commented Feb 6, 2021

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%) ⬆️

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%) ⬆️

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 foster999 changed the title Fix nested parsing of tab labels 🐛 FIX: nested parsing of tab labels Feb 6, 2021
@foster999 foster999 force-pushed the nested-parse-titles branch from dfb352a to 4569ffe Compare February 6, 2021 16:42
@foster999 foster999 requested a review from Daltz333 February 6, 2021 16:44
@foster999
Copy link
Copy Markdown
Collaborator Author

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

Copy link
Copy Markdown
Collaborator

@Daltz333 Daltz333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as familiar with the HTML changes, but the Python looks fine. I'll trust the tests.

@foster999
Copy link
Copy Markdown
Collaborator Author

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>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Images and math in tab headings broken in 2.0.0 Support monospaced font in tab title

2 participants