Skip to content

Glossary: Make url's wrapped in " because it seems to be better #2590

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

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addons/dialogic/Modules/Glossary/subsystem_glossary.gd
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func parse_glossary(text: String) -> String:
if regex_options.is_empty():
continue

var pattern: String = '(?<=\\W|^)(?<!\\\\)(?<word>' + regex_options + ')(?!])(?=\\W|$)'
var pattern: String = r'(?<=\W|^)(?<!\\)(?<word>' + regex_options + r')(?!])(?=\W|$)'

if entry.get('case_sensitive', def_case_sensitive):
regex.compile(pattern)
Expand All @@ -78,7 +78,7 @@ func parse_glossary(text: String) -> String:
color = color_overrides[entry_key].to_html()

text = regex.sub(text,
'[url=' + entry_key + ']' +
'[url="' + entry_key + '"]' +
'[color=' + color + ']${word}[/color]' +
'[/url]',
true
Expand Down