aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/html_codepreview.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/html_codepreview.go')
-rw-r--r--modules/markup/html_codepreview.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/markup/html_codepreview.go b/modules/markup/html_codepreview.go
index d9da24ea34..5ef2217e3d 100644
--- a/modules/markup/html_codepreview.go
+++ b/modules/markup/html_codepreview.go
@@ -60,7 +60,8 @@ func renderCodeBlock(ctx *RenderContext, node *html.Node) (urlPosStart, urlPosSt
}
func codePreviewPatternProcessor(ctx *RenderContext, node *html.Node) {
- for node != nil {
+ nodeStop := node.NextSibling
+ for node != nodeStop {
if node.Type != html.TextNode {
node = node.NextSibling
continue