Skip to content

Commit f8f0483

Browse files
committed
Fixes: removing "<>" from "Characters Requiring Whitespace" breaks auto-formatting #975
1 parent 420f6b6 commit f8f0483

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

External/Plugins/ASCompletion/Completion/Reformater.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ public static string ReformatLine(string txt, ReformatOptions options, ref int o
233233
needSpace = true;
234234
continue;
235235
}
236-
else needSpace = (c != '!' || (c2 != '(' && c2 != '['));
236+
else if (c != '!' || (c2 != '(' && c2 != '['))
237+
{
238+
if (options.Operators.IndexOf(c2) >= 0 && options.Operators.IndexOf(c) >= 0) needSpace = false;
239+
else needSpace = (c != '!' || (c2 != '(' && c2 != '['));
240+
}
237241

238242
if (i < n)
239243
{

0 commit comments

Comments
 (0)