mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 23:53:32 -05:00
Rename field i to the more descriptive idx
This commit is contained in:
parent
be57b1fe10
commit
be918d7145
1 changed files with 5 additions and 5 deletions
|
@ -29,7 +29,7 @@ type contentlexer struct {
|
||||||
|
|
||||||
ms matchState
|
ms matchState
|
||||||
matches [3]bool // track matches of the 3 prefixes
|
matches [3]bool // track matches of the 3 prefixes
|
||||||
i int // last index in matches checked
|
idx int // last index in matches checked
|
||||||
|
|
||||||
w io.Writer
|
w io.Writer
|
||||||
}
|
}
|
||||||
|
@ -60,9 +60,9 @@ func (l *contentlexer) match(r rune) {
|
||||||
// note, the prefixes can start off on the same foot, i.e.
|
// note, the prefixes can start off on the same foot, i.e.
|
||||||
// src and srcset.
|
// src and srcset.
|
||||||
if l.ms == matchStateWhitespace {
|
if l.ms == matchStateWhitespace {
|
||||||
l.i = 0
|
l.idx = 0
|
||||||
for j, p := range prefixes {
|
for j, p := range prefixes {
|
||||||
if r == p.r[l.i] {
|
if r == p.r[l.idx] {
|
||||||
l.matches[j] = true
|
l.matches[j] = true
|
||||||
found = true
|
found = true
|
||||||
if l.checkMatchState(r, j) {
|
if l.checkMatchState(r, j) {
|
||||||
|
@ -80,11 +80,11 @@ func (l *contentlexer) match(r rune) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
l.i++
|
l.idx++
|
||||||
for j, m := range l.matches {
|
for j, m := range l.matches {
|
||||||
// still a match?
|
// still a match?
|
||||||
if m {
|
if m {
|
||||||
if prefixes[j].r[l.i] == r {
|
if prefixes[j].r[l.idx] == r {
|
||||||
found = true
|
found = true
|
||||||
if l.checkMatchState(r, j) {
|
if l.checkMatchState(r, j) {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue