summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcodeparser.go
diff options
context:
space:
mode:
authorbep <bjorn.erik.pedersen@gmail.com>2015-04-30 15:59:14 +0200
committerbep <bjorn.erik.pedersen@gmail.com>2015-04-30 15:59:07 +0200
commitbe9df847723f414770d38c071eada0cbe646b4e3 (patch)
tree811582d96afb84aaa42d6613ff1250244d390218 /hugolib/shortcodeparser.go
parentbe7b830f33ca947fc6109e631c40b1c3e10666dd (diff)
shortcodeparser: fix panic on slash following opening shortcode comment
Fixes #1093
Diffstat (limited to 'hugolib/shortcodeparser.go')
-rw-r--r--hugolib/shortcodeparser.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/shortcodeparser.go b/hugolib/shortcodeparser.go
index 5621a382f..2efebbe4b 100644
--- a/hugolib/shortcodeparser.go
+++ b/hugolib/shortcodeparser.go
@@ -325,7 +325,7 @@ func lexShortcodeLeftDelim(l *pagelexer) stateFunc {
func lexShortcodeComment(l *pagelexer) stateFunc {
posRightComment := strings.Index(l.input[l.pos:], rightComment)
- if posRightComment < 0 {
+ if posRightComment <= 1 {
return l.errorf("comment must be closed")
}
// we emit all as text, except the comment markers