Skip to content

Commit

Permalink
Fix regex for 4.3 (dialogic-godot#2049)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jowan-Spooner committed Jan 29, 2024
1 parent 1cf2582 commit c4d623f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions addons/dialogic/Modules/Text/event_text.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ var character_identifier: String:

# Reference regex without Godot escapes: ((")?(?<name>(?(2)[^"\n]*|[^(: \n]*))(?(2)"|)(\W*\((?<portrait>.*)\))?\s*(?<!\\):)?(?<text>(.|\n)*)
var regex := RegEx.create_from_string("((\")?(?<name>(?(2)[^\"\\n]*|[^(: \\n]*))(?(2)\"|)(\\W*(?<portrait>\\(.*\\)))?\\s*(?<!\\\\):)?(?<text>(.|\\n)*)")
# Reference regex without godot escapes: ((\[n\]|\[n\+\])?((?!(\[n\]|\[n\+\]))(.|\n))*)
var split_regex := RegEx.create_from_string("((\\[n\\]|\\[n\\+\\])?((?!(\\[n\\]|\\[n\\+\\]))(.|\\n))*)")
var split_regex := RegEx.create_from_string(r"((\[n\]|\[n\+\])?((?!(\[n\]|\[n\+\]))(.|\n))+)")

enum States {REVEALING, IDLE, DONE}
var state := States.IDLE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ func _on_item_edited() -> void:

else:
if item.get_text(0) != item.get_metadata(0):
print("Variable renamed from '", item.get_metadata(0), "' to '", item.get_text(0),"'")
item.set_metadata(0, item.get_text(0))
report_name_changes(item)

2:
print("Variable default changed.")
item.set_metadata(2, get_variable_item_default(item))
"FOLDER":
report_name_changes(item)
Expand Down

0 comments on commit c4d623f

Please sign in to comment.