mirror of
https://github.com/golang/go
synced 2024-11-15 00:40:31 -07:00
template:fix line number is wrong in error info
This commit is contained in:
parent
165bf241f2
commit
dc23592c76
@ -352,6 +352,7 @@ func lexComment(l *lexer) stateFn {
|
||||
if !delim {
|
||||
return l.errorf("comment ends before closing delimiter")
|
||||
}
|
||||
l.line += strings.Count(l.input[l.start:l.pos], "\n")
|
||||
i := l.thisItem(itemComment)
|
||||
if trimSpace {
|
||||
l.pos += trimMarkerLen
|
||||
|
Loading…
Reference in New Issue
Block a user