diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2015-04-30 15:59:14 +0200 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-04-30 15:59:07 +0200 |
commit | be9df847723f414770d38c071eada0cbe646b4e3 (patch) | |
tree | 811582d96afb84aaa42d6613ff1250244d390218 /hugolib/shortcodeparser.go | |
parent | be7b830f33ca947fc6109e631c40b1c3e10666dd (diff) |
shortcodeparser: fix panic on slash following opening shortcode comment
Fixes #1093
Diffstat (limited to 'hugolib/shortcodeparser.go')
-rw-r--r-- | hugolib/shortcodeparser.go | 2 |
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 |