From fe654d70cc8dfd01d23a7b50f9d2b6904c68f3dc Mon Sep 17 00:00:00 2001 From: mappu Date: Thu, 16 Apr 2020 18:37:27 +1200 Subject: [PATCH] node: fix whitespace in generated comments --- node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node.go b/node.go index a8c4c39..5d66600 100644 --- a/node.go +++ b/node.go @@ -77,7 +77,7 @@ func normaliseCommentStrFragment(s string) string { lines[i] = lines[i][2:] } } - return `/* ` + strings.TrimRight(strings.Join(lines, "\n"), "\n") + `*/` + return `/*` + strings.TrimRight(strings.Join(lines, "\n"), "\n") + ` */` } func normaliseCommentStr(s string) string { @@ -98,7 +98,7 @@ func normaliseCommentStr(s string) string { } else { // len(parts) == 2 // Range comment part is OK // Only second middle part needs normalising - ret = append(ret, parts[0], normaliseCommentStrFragment(parts[1])) + ret = append(ret, `/*`+parts[0]+`*/`, normaliseCommentStrFragment(parts[1])) } }