fix handling consecutive code fences
@@ -415,10 +415,11 @@ func countBackticks(s string) int {
}
count = 0
}
- } else if r == '\n' {
+ }
+ if r == '\n' {
inBackticks = true
+ count = 0
}
- // skip other runes
}
if count > maxCount {
maxCount = count
