We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbbbb7d commit 0996a7cCopy full SHA for 0996a7c
src/SDK/Language/Go.php
@@ -267,13 +267,14 @@ public function getParamExample(array $param): string
267
public function getFilters(): array
268
{
269
return [
270
- new TwigFilter('godocComment', function ($value) {
+ new TwigFilter('godocComment', function ($value, $indent=0) {
271
$value = explode("\n", $value);
272
+ $indent = \str_repeat(' ', $indent);
273
foreach ($value as $key => $line) {
- $value[$key] = "// " . wordwrap($line, 75, "\n// ");
274
+ $value[$key] = "// " . wordwrap($line, 75, "\n" . $indent . "// ");
275
}
- return implode("\n", $value);
276
- }, ['is_safe' => ['html']])
+ return implode("\n" . $indent, $value);
277
+ }, ['is_safe' => ['html']]),
278
];
279
280
0 commit comments