Skip to content

Commit edb19bc

Browse files
🐛 fix: make math tips work in non-furo themes (#14)
1 parent d03ff16 commit edb19bc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/sphinx_tippy.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,12 @@ def create_id_to_tip_html(
416416
):
417417
id_to_html[str(tag["id"])] = _get_header_html(header)
418418

419-
elif tag.name == "div" and "math-wrapper" in (tag.get("class") or []):
419+
elif tag.name == "div" and (
420+
all(
421+
class_to_check in (tag.get("class") or [])
422+
for class_to_check in ("math", "notranslate", "nohighlight")
423+
)
424+
):
420425
# remove an span with eqno class, since it is not needed
421426
# and it can cause issues with the tooltip
422427
# (e.g. if the span is the last element in the div)

0 commit comments

Comments
 (0)