Hello, I was writing an article that explains some PHP code, and found this issue.
Steps to reproduce
Generate a page using the following markdown code:
{% toc %}
## aaa
### bbb
## ccc
```
<h1>ddd</h1>
```
The generated TOC will only have a single entry "ddd". Is this an expected behavior?