From ff96a0f6cc47334000a2df297d36bbd381846051 Mon Sep 17 00:00:00 2001 From: Banaanae <83927639+Banaanae@users.noreply.github.com> Date: Tue, 13 Aug 2024 20:51:51 +1000 Subject: [PATCH] fix gui space issue see #281 --- ConvertFuncs.ahk | 2 +- .../Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah1 | 2 ++ .../Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah2 | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah1 create mode 100644 tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah2 diff --git a/ConvertFuncs.ahk b/ConvertFuncs.ahk index fbe3ddc5..f631add6 100644 --- a/ConvertFuncs.ahk +++ b/ConvertFuncs.ahk @@ -1731,7 +1731,7 @@ _Gui(p) { if (RegExMatch(GuiOldName, "^oGui\d+$")) { GuiOldName := StrReplace(GuiOldName, "oGui") } - Var1 := RegExReplace(p[1], "i)^([^:]*):(.*)$", "$2") + Var1 := RegExReplace(p[1], "i)^([^:]*):\s*(.*)$", "$2") Var2 := p[2] Var3 := p[3] Var4 := p[4] diff --git a/tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah1 b/tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah1 new file mode 100644 index 00000000..298e8d48 --- /dev/null +++ b/tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah1 @@ -0,0 +1,2 @@ +Gui, GuiName: Add, Text,, Spaces do not appear`nbetween name and method +Gui, GuiName: Show, w200 h100 \ No newline at end of file diff --git a/tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah2 b/tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah2 new file mode 100644 index 00000000..1bb92031 --- /dev/null +++ b/tests/Test_Folder/Graphical User Interfaces/Gui_issue281_ex1.ah2 @@ -0,0 +1,3 @@ +GuiName := Gui() +GuiName.Add("Text", , "Spaces do not appear`nbetween name and method") +GuiName.Show("w200 h100") \ No newline at end of file