Fix interaction between newlines and semicolons
This commit is contained in:
parent
3209336be9
commit
5baf5e3559
|
@ -172,7 +172,7 @@ private:
|
||||||
void formatStep()
|
void formatStep()
|
||||||
{
|
{
|
||||||
import std.range : assumeSorted;
|
import std.range : assumeSorted;
|
||||||
import std.algorithm : canFind;
|
import std.algorithm : canFind, startsWith;
|
||||||
|
|
||||||
assert (index < tokens.length);
|
assert (index < tokens.length);
|
||||||
if (current.type == tok!"comment")
|
if (current.type == tok!"comment")
|
||||||
|
@ -387,7 +387,8 @@ private:
|
||||||
tempIndent = 0;
|
tempIndent = 0;
|
||||||
writeToken();
|
writeToken();
|
||||||
linebreakHints = [];
|
linebreakHints = [];
|
||||||
if (index >= tokens.length || current.type != tok!"comment")
|
if (index >= tokens.length || current.type != tok!"comment"
|
||||||
|
|| current.line != tokens[index - 1].line)
|
||||||
newline();
|
newline();
|
||||||
if (peekImplementation(tok!"class",0))
|
if (peekImplementation(tok!"class",0))
|
||||||
newline();
|
newline();
|
||||||
|
|
Loading…
Reference in New Issue