Skip to content

Commit 7a9f7b6

Browse files
zyebytevtWebFreak001
authored andcommitted
Fix shortened FunctionBody and comment formatting
1 parent 63556f0 commit 7a9f7b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dparse/formatter.d

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ class Formatter(Sink)
11781178
if (member.comment.length)
11791179
{
11801180
space();
1181-
put(member.comment);
1181+
putComment(member.comment);
11821182
}
11831183
}
11841184
endBlock();
@@ -1497,6 +1497,7 @@ class Formatter(Sink)
14971497
with(functionBody)
14981498
{
14991499
if (specifiedFunctionBody) format(specifiedFunctionBody);
1500+
if (shortenedFunctionBody) format(shortenedFunctionBody);
15001501
if (missingFunctionBody) format(missingFunctionBody);
15011502
}
15021503
}
@@ -4000,7 +4001,7 @@ protected:
40004001
{
40014002
import std.string : splitLines;
40024003
if (!c.length) return;
4003-
put(c.splitLines().join("\n" ~ getIndent()));
4004+
put(c.splitLines().map!((x) => "/// " ~ x).join("\n" ~ getIndent()));
40044005
newlineIndent();
40054006
}
40064007

0 commit comments

Comments
 (0)