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 79989ba commit 9ed0398Copy full SHA for 9ed0398
internal/lsp/template/parse.go
@@ -86,6 +86,7 @@ func parseBuffer(buf []byte) *Parsed {
86
ans := &Parsed{
87
buf: buf,
88
check: -1,
89
+ nls: []int{-1},
90
}
91
if len(buf) == 0 {
92
ans.ParseErr = errors.New("empty buffer")
@@ -103,7 +104,6 @@ func parseBuffer(buf []byte) *Parsed {
103
104
105
// at the cost of complexity we could fold this into the allAscii loop
106
ans.lines = bytes.Split(buf, []byte{'\n'})
- ans.nls = []int{-1}
107
for i, p := range ans.buf {
108
if p == '\n' {
109
ans.nls = append(ans.nls, i)
0 commit comments