mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
parser: Final (!) fix for issue with escaped JSON front matter
Fixes #3682
This commit is contained in:
@@ -337,7 +337,6 @@ func extractFrontMatterDelims(r *bufio.Reader, left, right []byte) (fm []byte, e
|
||||
if escapeState != 1 {
|
||||
inQuote = !inQuote
|
||||
}
|
||||
escapeState = 0
|
||||
case '\\':
|
||||
escapeState++
|
||||
case left[len(left)-1]:
|
||||
@@ -403,6 +402,10 @@ func extractFrontMatterDelims(r *bufio.Reader, left, right []byte) (fm []byte, e
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
if c != '\\' {
|
||||
escapeState = 0
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user