Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only highlight text in HTML elements (#235) #451

Closed
wants to merge 1 commit into from

Conversation

McShelby
Copy link

Fixes #235.

Mermaid uses different techniques to generate text in graphs:

  1. in a native svg element
  2. in a svg foreignObject element that embedds html

Highlightning fails for the first case. This patch avoids highlighting text in those elements.
Highlightning for the second case is preserved with this patch.

For users this may be a bit suprising to sometimes see highlighted text in mermaid graphs and sometimes not.

@McShelby McShelby closed this Jul 2, 2021
@McShelby McShelby deleted the McShelby/issue235 branch July 2, 2021 15:53
maxatome pushed a commit to maxatome/hugo-theme-learn that referenced this pull request Jan 23, 2024
maxatome pushed a commit to maxatome/hugo-theme-learn that referenced this pull request Jan 23, 2024
maxatome pushed a commit to maxatome/hugo-theme-learn that referenced this pull request Jan 23, 2024
maxatome pushed a commit to maxatome/hugo-theme-learn that referenced this pull request Jan 23, 2024
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.

Search highlighting makes text within Mermaid-rendered SVG diagrams disappear when matched
1 participant