Skip to content

Commit

Permalink
πŸ› fix: make math tips work in non-furo themes (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValMystletainn authored Apr 22, 2024
1 parent d03ff16 commit edb19bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sphinx_tippy.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,12 @@ def create_id_to_tip_html(
):
id_to_html[str(tag["id"])] = _get_header_html(header)

elif tag.name == "div" and "math-wrapper" in (tag.get("class") or []):
elif tag.name == "div" and (
all(
class_to_check in (tag.get("class") or [])
for class_to_check in ("math", "notranslate", "nohighlight")
)
):
# remove an span with eqno class, since it is not needed
# and it can cause issues with the tooltip
# (e.g. if the span is the last element in the div)
Expand Down

0 comments on commit edb19bc

Please sign in to comment.