diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-04 00:06:10 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-05-04 00:06:00 +0200 |
commit | be918d71457407b4d6649ab2cb6940c153b40bab (patch) | |
tree | 264b23f676d61c443eba0cea9157732f336bccdf /transform | |
parent | be57b1fe1081ddde218a11aefa44c840b8e23106 (diff) | |
download | hugo-be918d71457407b4d6649ab2cb6940c153b40bab.tar.gz hugo-be918d71457407b4d6649ab2cb6940c153b40bab.zip |
Rename field i to the more descriptive idx
Diffstat (limited to 'transform')
-rw-r--r-- | transform/absurlreplacer.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/transform/absurlreplacer.go b/transform/absurlreplacer.go index b38dd9a98..40c9be75e 100644 --- a/transform/absurlreplacer.go +++ b/transform/absurlreplacer.go @@ -29,7 +29,7 @@ type contentlexer struct { ms matchState 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 } @@ -60,9 +60,9 @@ func (l *contentlexer) match(r rune) { // note, the prefixes can start off on the same foot, i.e. // src and srcset. if l.ms == matchStateWhitespace { - l.i = 0 + l.idx = 0 for j, p := range prefixes { - if r == p.r[l.i] { + if r == p.r[l.idx] { l.matches[j] = true found = true if l.checkMatchState(r, j) { @@ -80,11 +80,11 @@ func (l *contentlexer) match(r rune) { return } - l.i++ + l.idx++ for j, m := range l.matches { // still a match? if m { - if prefixes[j].r[l.i] == r { + if prefixes[j].r[l.idx] == r { found = true if l.checkMatchState(r, j) { return |