mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
all: Run modernize -fix ./...
This commit is contained in:
@@ -100,10 +100,7 @@ func (c *rstConverter) getRstContent(src []byte, ctx converter.DocumentContext)
|
||||
|
||||
bodyEnd := bytes.Index(result, []byte("\n</body>"))
|
||||
if bodyEnd < 0 || bodyEnd >= len(result) {
|
||||
bodyEnd = len(result) - 1
|
||||
if bodyEnd < 0 {
|
||||
bodyEnd = 0
|
||||
}
|
||||
bodyEnd = max(len(result)-1, 0)
|
||||
}
|
||||
|
||||
return result[bodyStart+7 : bodyEnd], err
|
||||
|
Reference in New Issue
Block a user