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:
parent
7162095635
commit
341da3cea7
4 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue