Fix #222
This commit is contained in:
parent
db2ad1354b
commit
08c2d0c5e8
|
@ -364,7 +364,9 @@ private:
|
||||||
immutable canAddNewline = currTokenLine - prevTokenEndLine < 1;
|
immutable canAddNewline = currTokenLine - prevTokenEndLine < 1;
|
||||||
if (peekBackIsOperator() && !isSeparationToken(t))
|
if (peekBackIsOperator() && !isSeparationToken(t))
|
||||||
pushWrapIndent(t);
|
pushWrapIndent(t);
|
||||||
if (peekBackIs(tok!")") && !canAddNewline && prevTokenEndLine < currTokenLine)
|
if (peekBackIsOperator() && !peekBackIsOneOf(false, tok!"comment",
|
||||||
|
tok!"{", tok!"}", tok!":", tok!";", tok!",", tok!"[", tok!"(")
|
||||||
|
&& !canAddNewline && prevTokenEndLine < currTokenLine)
|
||||||
write(" ");
|
write(" ");
|
||||||
else if (prevTokenEndLine == currTokenLine || (t == tok!")" && peekIs(tok!"{")))
|
else if (prevTokenEndLine == currTokenLine || (t == tok!")" && peekIs(tok!"{")))
|
||||||
write(" ");
|
write(" ");
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
return (complicated % expression) / //-------------------
|
||||||
|
(other * complicated + expression);
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
return (complicated % expression) /
|
||||||
|
//-------------------
|
||||||
|
(other * complicated + expression);
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
unittest {
|
||||||
|
return (complicated % expression) / //-------------------
|
||||||
|
(other * complicated + expression);
|
||||||
|
}
|
Loading…
Reference in New Issue