mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-02 14:32:33 +08:00
Fix inappropriate markdown post process end tag check
When <code> is nested inside <pre>, the next end tag token would not able to be the same as outer-most start tag. So we only check outer-most start and end tag token to be the same.
This commit is contained in:
@ -303,10 +303,10 @@ OUTER_LOOP:
|
||||
}
|
||||
|
||||
// If this is the close tag to the outer-most, we are done
|
||||
if token.Type == html.EndTagToken && strings.EqualFold(tagName, token.Data) {
|
||||
if token.Type == html.EndTagToken {
|
||||
stackNum--
|
||||
|
||||
if stackNum == 0 {
|
||||
if stackNum <= 0 && strings.EqualFold(tagName, token.Data) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user