Fix tooltip raw wikitext display and CSS bracket bleed#149
Open
anome2002 wants to merge 3 commits intoSemanticMediaWiki:masterfrom
Open
Fix tooltip raw wikitext display and CSS bracket bleed#149anome2002 wants to merge 3 commits intoSemanticMediaWiki:masterfrom
anome2002 wants to merge 3 commits intoSemanticMediaWiki:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tooltip wikitext rendering: When
api.parsesucceeds but jQuery cannot extract.scite-api-parsecontent, the tooltip now falls back towikitextToHtml()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 awere bleeding into tooltip popups (both tippy.js and jQuery fallback). Scoped selectors to.scite-citeref-number > aand added explicitcontent: noneoverride for.tippy-contentand.scite-simple-tooltip.Version bumped to 4.0.1
Request
Could a maintainer please tag this as
4.0.1after merge so it becomes available on Packagist?