mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-19 22:53:53 +00:00
transform: remove some superfluous int conversions
This commit is contained in:
parent
658cfb287e
commit
b15d0a168f
1 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ func checkCandidate(l *contentlexer) {
|
||||||
if bytes.HasPrefix(l.content[l.pos:], m.match) {
|
if bytes.HasPrefix(l.content[l.pos:], m.match) {
|
||||||
// check for schemaless URLs
|
// check for schemaless URLs
|
||||||
posAfter := l.pos + len(m.match)
|
posAfter := l.pos + len(m.match)
|
||||||
if int(posAfter) >= len(l.content) {
|
if posAfter >= len(l.content) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
r, _ := utf8.DecodeRune(l.content[posAfter:])
|
r, _ := utf8.DecodeRune(l.content[posAfter:])
|
||||||
|
@ -147,7 +147,7 @@ func (l *contentlexer) replace() {
|
||||||
var r rune
|
var r rune
|
||||||
|
|
||||||
for {
|
for {
|
||||||
if int(l.pos) >= contentLength {
|
if l.pos >= contentLength {
|
||||||
l.width = 0
|
l.width = 0
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue