From be9df847723f414770d38c071eada0cbe646b4e3 Mon Sep 17 00:00:00 2001 From: bep Date: Thu, 30 Apr 2015 15:59:14 +0200 Subject: shortcodeparser: fix panic on slash following opening shortcode comment Fixes #1093 --- hugolib/shortcodeparser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hugolib/shortcodeparser.go') 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 -- cgit v1.2.3