mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-24 18:44:34 +00:00
parent
abc54080ec
commit
78c99463fd
1 changed files with 1 additions and 2 deletions
|
@ -670,7 +670,6 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
|
||||||
return source, nil
|
return source, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceLen := len(source)
|
|
||||||
start := 0
|
start := 0
|
||||||
|
|
||||||
pre := []byte("HAHA" + prefix)
|
pre := []byte("HAHA" + prefix)
|
||||||
|
@ -694,7 +693,7 @@ func replaceShortcodeTokens(source []byte, prefix string, replacements map[strin
|
||||||
|
|
||||||
// Issue #1148: Check for wrapping p-tags <p>
|
// Issue #1148: Check for wrapping p-tags <p>
|
||||||
if j >= 3 && bytes.Equal(source[j-3:j], pStart) {
|
if j >= 3 && bytes.Equal(source[j-3:j], pStart) {
|
||||||
if (k+4) < sourceLen && bytes.Equal(source[end:end+4], pEnd) {
|
if (k+4) < len(source) && bytes.Equal(source[end:end+4], pEnd) {
|
||||||
j -= 3
|
j -= 3
|
||||||
end += 4
|
end += 4
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue