Don't replace term if there is already a link on this term in the page

Created on 6 March 2025, about 1 month ago

Problem/Motivation

Sometimes the page already contains links manually added on terms.
When this happens and the $first_only option is used, glossify will still add a link on the next occurrence of the term.
We would prefer that it considers the term already linked.

Steps to reproduce

<a href="http://example.com/">Lorem</a> ipsum.
Lorem ipsum.

If one of the terms is lorem, the second occurrence will be replaced although the first one is already a link.

Proposed resolution

Before parsing the text, GlossifyBase::parseTooltipMatch() should look for links containing terms.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇫🇷France prudloff Lille

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024