Level 1 headers inside code blocks should not be processed (BB-8822)
<<toc / 1>> tag is supposed to show the level 1 headers from all other Wiki files in the same folder.
Level 1 headers inside code blocks in markdown files are processed, but they should not be.
- "Regular Markdown syntax is not processed within code blocks. E.g., asterisks are just literal asterisks within a code block. This means it’s also easy to use Markdown to write about Markdown’s own syntax."
For example, if one of my wiki markdown files contains this text:
```bash #!/bin/bash # myscript.sh echo "Hi there :)" ```
then the table of contents in a second file produced by using the Creole tag
<<toc / 1>> will contain a listing called "myscript.sh" when it should not.
I assume this problem arises because a simple regular expression is used to find all level 1 headers. A more sophisticated parsing approach should be used instead to avoid processing level 1 headers inside code blocks.