projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
658cfb2
)
transform: remove some superfluous int conversions
author
bep
<bjorn.erik.pedersen@gmail.com>
Wed, 18 Mar 2015 19:18:18 +0000
(20:18 +0100)
committer
bep
<bjorn.erik.pedersen@gmail.com>
Wed, 18 Mar 2015 19:18:18 +0000
(20:18 +0100)
transform/absurlreplacer.go
patch
|
blob
|
history
diff --git
a/transform/absurlreplacer.go
b/transform/absurlreplacer.go
index 1f3f77d9abeb13cbe594f55b603dd1ec44f9c234..13a34c738e15636dcf2709fa2012fbbdd177398e 100644
(file)
--- a/
transform/absurlreplacer.go
+++ b/
transform/absurlreplacer.go
@@
-122,7
+122,7
@@
func checkCandidate(l *contentlexer) {
if bytes.HasPrefix(l.content[l.pos:], m.match) {
// check for schemaless URLs
posAfter := l.pos + len(m.match)
- if
int(posAfter)
>= len(l.content) {
+ if
posAfter
>= len(l.content) {
return
}
r, _ := utf8.DecodeRune(l.content[posAfter:])
@@
-147,7
+147,7
@@
func (l *contentlexer) replace() {
var r rune
for {
- if
int(l.pos)
>= contentLength {
+ if
l.pos
>= contentLength {
l.width = 0
break
}