In Github/MD, if we want to enable code block when it is a child of list, we need to intent it by 8 spaces.
But how to make that code block has the syntax highlighting feature?
The following code does not work as expected…
1. foo
```python
print 'bar'
```
2. bar
without spaces should work: from GitHub help page:
As illustrated in hilz‘s answer below, you need to indent the ““ with the same indentation level + 2 spaces than your list.
The content of the code block doesn’t need to be indented.
See this gist as an example: