Skip to content

Commit 0586f2a

Browse files
experiment to verify GitHub actions
PiperOrigin-RevId: 445879707
1 parent 74888fd commit 0586f2a

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

parser/parser.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ func (p *parser) parse(isRoot bool) (result []*ast.Node, endPos ast.Position, er
593593

594594
// endPos points at the closing brace, but we should rather return the position
595595
// of the first character after the previous item. Therefore let's rewind a bit:
596-
for endPos.Byte > 0 && p.in[endPos.Byte-1] == ' ' {
596+
for p.in[endPos.Byte-1] == ' ' {
597597
endPos.Byte--
598598
endPos.Column--
599599
}
@@ -856,9 +856,6 @@ func (p *parser) isValueSep(i int) bool {
856856
}
857857

858858
func (p *parser) advance(i int) string {
859-
if i > p.length {
860-
i = p.length
861-
}
862859
res := p.in[p.index:i]
863860
p.index = i
864861
strRes := string(res)
@@ -1014,7 +1011,7 @@ func (p *parser) readTemplate() string {
10141011
}
10151012
}
10161013
}
1017-
if i < p.length && p.in[i] == '%' {
1014+
if p.in[i] == '%' {
10181015
i++
10191016
break
10201017
}

0 commit comments

Comments
 (0)