Skip to content

Commit

Permalink
Fix autocoloring (#1279)
Browse files Browse the repository at this point in the history
Converting an array to a string now adds " to all strings, so I had to remove them from the regex.
  • Loading branch information
Jowan-Spooner authored Nov 3, 2022
1 parent 57da95e commit b6aa59a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions addons/dialogic/Events/Text/Subsystem_Text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,4 @@ func update_character_names() -> void:
if nickname.strip_edges():
character_colors[nickname.strip_edges()] = dch.color

color_regex.compile('(?<=\\W)(?<name>'+str(character_colors.keys()).trim_prefix('[').trim_suffix(']').replace(', ', '|')+')(?=\\W|$)')

color_regex.compile('(?<=\\W)(?<name>'+str(character_colors.keys()).trim_prefix('["').trim_suffix('"]').replace('", "', '|')+')(?=\\W|$)')

0 comments on commit b6aa59a

Please sign in to comment.