File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ func TestCrash1(t *testing.T) {
28
28
}
29
29
}
30
30
31
- // TODO: this enters infinite loop
32
- func NoTestInfinite1 (t * testing.T ) {
31
+ func TestInfinite1 (t * testing.T ) {
33
32
test := "[[[[[[\n \t : ]]]]]]\n \n : " + "\n \n :(()"
34
33
c := make (chan bool , 1 )
35
34
go func () {
@@ -77,7 +76,7 @@ main.main()
77
76
go.fuzz.main/main.go:10 +0x2d fp=0xc42049df80 sp=0xc42049df68 pc=0x1118dad
78
77
runtime.main()
79
78
*/
80
- func NoTestInfinite2 (t * testing.T ) {
79
+ func TestInfinite2 (t * testing.T ) {
81
80
test := ":\x00 \x00 \x00 \x01 V\n >* \x00 \x80 e\n \t * \n \n :\t "
82
81
83
82
c := make (chan bool , 1 )
Original file line number Diff line number Diff line change @@ -244,7 +244,8 @@ func (p *Parser) block(data []byte) {
244
244
245
245
// anything else must look like a normal paragraph
246
246
// note: this finds underlined headings, too
247
- data = data [p .paragraph (data ):]
247
+ idx := p .paragraph (data )
248
+ data = data [idx :]
248
249
}
249
250
250
251
p .nesting --
@@ -1479,7 +1480,8 @@ func (p *Parser) paragraph(data []byte) int {
1479
1480
// did this blank line followed by a definition list item?
1480
1481
if p .extensions & DefinitionLists != 0 {
1481
1482
if i < len (data )- 1 && data [i + 1 ] == ':' {
1482
- return p .list (data [prev :], ast .ListTypeDefinition )
1483
+ listLen := p .list (data [prev :], ast .ListTypeDefinition )
1484
+ return prev + listLen
1483
1485
}
1484
1486
}
1485
1487
You can’t perform that action at this time.
0 commit comments