Skip to content

Block parsing for fenced code blocks with syntax highlighting in lists regression. #495

@dmitshur

Description

@dmitshur

I've just discovered PR #476 is causing the following regression in v1. /cc @tfogo @client9

Given this Markdown input:

### Codeblock within list

-	list entry 1

	```
	if (i == 5)
	    break;
	```

-	list entry 2

### Stuff that comes later

stuff here

Everything works as expected:

image

However, if one uses a fenced code block with syntax highlighting, everything that comes after the fenced code block ends up being a part of "list entry 1":

### Codeblock within list

-	list entry 1

	```C
	if (i == 5)
	    break;
	```

-	list entry 2

### Stuff that comes later

stuff here

image

I.e., it parses as if the input was:

### Codeblock within list

-	list entry 1

	```C
	if (i == 5)
	    break;
	```

	-	list entry 2

	### Stuff that comes later

	stuff here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions