summaryrefslogtreecommitdiffstats
path: root/parser/page.go
diff options
context:
space:
mode:
Diffstat (limited to 'parser/page.go')
-rw-r--r--parser/page.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser/page.go b/parser/page.go
index ed3f64010..57b2d3045 100644
--- a/parser/page.go
+++ b/parser/page.go
@@ -181,7 +181,7 @@ func chompFrontmatterStartComment(r *bufio.Reader) (err error) {
return nil
}
testStr := strings.TrimSuffix(str[0:lineEnd], "\r")
- if strings.Index(testStr, HTMLCommentEnd) != -1 {
+ if strings.Contains(testStr, HTMLCommentEnd) {
return nil
}
buf := make([]byte, lineEnd)
@@ -208,7 +208,7 @@ func chompFrontmatterEndComment(r *bufio.Reader) (err error) {
return nil
}
testStr := strings.TrimSuffix(str[0:lineEnd], "\r")
- if strings.Index(testStr, HTMLCommentStart) != -1 {
+ if strings.Contains(testStr, HTMLCommentStart) {
return nil
}