diff --git a/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd b/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd index 5dfb877ff..2e9ee90df 100644 --- a/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd +++ b/addons/dialogic/Editor/TimelineEditor/TextEditor/syntax_highlighter.gd @@ -179,9 +179,10 @@ func color_region(dict:Dictionary, color:Color, line:String, start:String, end:S end = "\\"+end if end.is_empty(): - region_regex.compile("(? void: ## Applies modifiers, effects and coloring to the text func parse_text(text:String, type:int=TextTypes.DIALOG_TEXT, variables := true, glossary := true, modifiers:= true, effects:= true, color_names:= true) -> String: - if modifiers: - text = parse_text_modifiers(text, type) if variables and dialogic.has_subsystem('VAR'): text = dialogic.VAR.parse_variables(text) + if modifiers: + text = parse_text_modifiers(text, type) if effects: text = parse_text_effects(text) if color_names: diff --git a/addons/dialogic/Modules/Variable/subsystem_variables.gd b/addons/dialogic/Modules/Variable/subsystem_variables.gd index b14ba6841..331cfe374 100644 --- a/addons/dialogic/Modules/Variable/subsystem_variables.gd +++ b/addons/dialogic/Modules/Variable/subsystem_variables.gd @@ -59,7 +59,7 @@ func parse_variables(text:String) -> String: # Trying to extract the curly brackets from the text var regex := RegEx.new() - regex.compile("(?([^{}]|\\{.*\\})*)\\}") + regex.compile(r"(?([^{}]|\{[^}]*\})*)\}") var parsed := text.replace('\\{', '{') for result in regex.search_all(text):