mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 15:10:35 +03:00
shortcodeparser: fix panic on slash following opening shortcode comment
Fixes #1093
This commit is contained in:
parent
be7b830f33
commit
be9df84772
4 changed files with 38 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue