aboutsummaryrefslogtreecommitdiffstats
path: root/modules/base
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base')
-rw-r--r--modules/base/markdown.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index cf7a3193f8..06de146726 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -299,6 +299,10 @@ OUTER_LOOP:
}
case html.EndTagToken:
+ if len(startTags) == 0 {
+ break
+ }
+
buf.Write(leftAngleBracket)
buf.WriteString(startTags[len(startTags)-1])
buf.Write(rightAngleBracket)