We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5027b6 commit 2a238f8Copy full SHA for 2a238f8
modules/markup/html.go
@@ -945,6 +945,9 @@ func comparePatternProcessor(ctx *RenderContext, node *html.Node) {
945
}
946
947
// Ensure that every group (m[0]...m[7]) has a match
948
+ if len(m) < 8 {
949
+ return
950
+ }
951
for i := 0; i < 8; i++ {
952
if m[i] == -1 {
953
return
@@ -957,7 +960,7 @@ func comparePatternProcessor(ctx *RenderContext, node *html.Node) {
957
960
text2 := base.ShortSha(node.Data[m[6]:m[7]])
958
961
959
962
hash := ""
- if m[9] > 0 {
963
+ if len(m) > 9 && m[9] > 0 {
964
hash = node.Data[m[8]:m[9]][1:]
965
966
0 commit comments