node: make sure transferred comments do not comment out legitimate source lines(!)
This commit is contained in:
parent
475ddeb13c
commit
199654f552
4
node.go
4
node.go
@ -93,6 +93,10 @@ func (this *conversionState) convert(n node.Node) (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(freePrefix) > 0 && !(strings.HasSuffix(freePrefix, "\n") || strings.HasSuffix(freePrefix, `*/`)) {
|
||||||
|
freePrefix += "\n"
|
||||||
|
}
|
||||||
|
|
||||||
return freePrefix + ret + freeSuffix, nil
|
return freePrefix + ret + freeSuffix, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user