Skip to content

Commit dc71ecd

Browse files
Glossary: Make glossary url's wrapped in "" because it seems to be better (#2590)
This allows the use of ' in glossary entry names
1 parent 9c4e915 commit dc71ecd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/dialogic/Modules/Glossary/subsystem_glossary.gd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func parse_glossary(text: String) -> String:
6464
if regex_options.is_empty():
6565
continue
6666

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

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

8080
text = regex.sub(text,
81-
'[url=' + entry_key + ']' +
81+
'[url="' + entry_key + '"]' +
8282
'[color=' + color + ']${word}[/color]' +
8383
'[/url]',
8484
true

0 commit comments

Comments
 (0)