mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-01 23:31:34 -05:00
Remove unused var
This commit is contained in:
parent
004fcddc80
commit
dbd93f5112
1 changed files with 2 additions and 5 deletions
|
@ -461,7 +461,6 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
|
||||||
var buff bytes.Buffer
|
var buff bytes.Buffer
|
||||||
|
|
||||||
sourceLen := len(source)
|
sourceLen := len(source)
|
||||||
width := 0
|
|
||||||
start := 0
|
start := 0
|
||||||
|
|
||||||
pre := []byte("{@{@" + prefix)
|
pre := []byte("{@{@" + prefix)
|
||||||
|
@ -492,16 +491,14 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
|
||||||
}
|
}
|
||||||
|
|
||||||
oldVal := source[j:end]
|
oldVal := source[j:end]
|
||||||
w, err := buff.Write(source[start:j])
|
_, err := buff.Write(source[start:j])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.New("buff write failed")
|
return nil, errors.New("buff write failed")
|
||||||
}
|
}
|
||||||
width += w
|
_, err = buff.Write(newVal)
|
||||||
w, err = buff.Write(newVal)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.New("buff write failed")
|
return nil, errors.New("buff write failed")
|
||||||
}
|
}
|
||||||
width += w
|
|
||||||
start = j + len(oldVal)
|
start = j + len(oldVal)
|
||||||
|
|
||||||
k = bytes.Index(source[start:], pre)
|
k = bytes.Index(source[start:], pre)
|
||||||
|
|
Loading…
Reference in a new issue