shortcodeparser: fix panic on slash following opening shortcode comment

Fixes #1093
This commit is contained in:
bep 2015-04-30 15:59:14 +02:00
parent be7b830f33
commit be9df84772
4 changed files with 38 additions and 5 deletions

View file

@ -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