diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/markdown.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go index dac51ebc27..10158edd32 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -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 } } |