out of bounds
parent
6ea5f2c675
commit
1b8f7f86f4
|
|
@ -68,7 +68,7 @@ func (n *Notes) commentFormer(urlPath string, md []byte) html.RenderNodeFunc {
|
|||
cur++
|
||||
for cur < len(lines) {
|
||||
for _, opener_closer := range [][]string{{"```", "```"}, {`<summary>`, `</summary>`}} {
|
||||
if bytes.Contains(lines[cur], []byte(opener_closer[0])) {
|
||||
if cur < len(lines) && bytes.Contains(lines[cur], []byte(opener_closer[0])) {
|
||||
cur++
|
||||
for cur < len(lines) && !bytes.Contains(lines[cur], []byte(opener_closer[1])) {
|
||||
cur++
|
||||
|
|
|
|||
Loading…
Reference in New Issue