Skip to content

Commit 7f1b837

Browse files
Fix and improve auto-pauses regex (#2349)
This had been completely broken... My bad. It is now also improved to better handle {Variables.Some} {Expressions.some(2.x)} and [effect=so.me].
1 parent 082c129 commit 7f1b837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/dialogic/Modules/Text/subsystem_text.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func _ready() -> void:
396396
_autopauses = {}
397397
var autopause_data: Dictionary = ProjectSettings.get_setting('dialogic/text/autopauses', {})
398398
for i in autopause_data.keys():
399-
_autopauses[RegEx.create_from_string(r"(?<!(\[|\{))[.,](?!([\w\s]*!?[\]\}]|$))")] = autopause_data[i]
399+
_autopauses[RegEx.create_from_string(r"(?<!(\[|\{))["+i+r"](?!([^{}\[\]]*[\]\}]|$))")] = autopause_data[i]
400400

401401

402402
## Parses the character's display_name and returns the text that

0 commit comments

Comments
 (0)