node: fix whitespace in generated comments
This commit is contained in:
parent
ae04fa73ef
commit
fe654d70cc
4
node.go
4
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]))
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user