Ending a list
What if you want to put an indented code block after a list?
- item one
- item two
{ my code block }
Trouble! Here pandoc (like other markdown implementations) will treat { my code block }
as the second paragraph of item two, and not as a code block.
To “cut off” the list after item two, you can insert some non-indented content, like an HTML comment, which won’t produce visible output in any format:
- item one
- item two
<!-- end of list -->
{ my code block }
You can use the same trick if you want two consecutive lists instead of one big list:
1. one
2. two
3. three
<!-- -->
1. uno
2. dos
3. tres