Skip to content

Fix tooltip raw wikitext display and CSS bracket bleed#149

Open
anome2002 wants to merge 3 commits intoSemanticMediaWiki:masterfrom
anome2002:mw-1.43-compat
Open

Fix tooltip raw wikitext display and CSS bracket bleed#149
anome2002 wants to merge 3 commits intoSemanticMediaWiki:masterfrom
anome2002:mw-1.43-compat

Conversation

@anome2002
Copy link
Contributor

Summary

  • Tooltip wikitext rendering: When api.parse succeeds but jQuery cannot extract .scite-api-parse content, the tooltip now falls back to wikitextToHtml() instead of displaying raw citation text. This fixes wikilinks like [[Page#Section|Label]] showing as [[...]] in tooltips instead of rendered clickable links.

  • CSS bracket scoping: The [ ] bracket pseudo-elements on .scite-citeref-number a were bleeding into tooltip popups (both tippy.js and jQuery fallback). Scoped selectors to .scite-citeref-number > a and added explicit content: none override for .tippy-content and .scite-simple-tooltip.

  • Version bumped to 4.0.1

Request

Could a maintainer please tag this as 4.0.1 after merge so it becomes available on Packagist?

Restores api.parse call for full wikitext rendering (links, templates)
in tooltips. If api.parse fails (e.g. MW 1.45 SchemaContentHandler
incompatibility), falls back to client-side wikitext-to-HTML conversion
that handles bold, italic, wiki links, and external links.

Fixes SemanticMediaWiki#147
- scite.tooltip.js: When api.parse succeeds but jQuery cannot extract
  .scite-api-parse content, fall back to wikitextToHtml() instead of
  raw citationText. This fixes wikilinks like [[Page#Section|Label]]
  showing as raw text in tooltips.

- scite.styles.css: Scope bracket pseudo-elements ([]) to direct child
  links (.scite-citeref-number > a) and add explicit override for
  .tippy-content and .scite-simple-tooltip to prevent brackets from
  bleeding into tooltip popups.

Fixes: citation text containing wikilinks displayed as [[...]] in
tooltip instead of rendered clickable links.
Release 4.0.1 with tooltip wikitext rendering fix and CSS bracket
scoping for tooltip popups.
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.

1 participant