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