Previously in Markdown files, Vim would treat heading syntax in code
fences as Markdown headers. This commit ensures that only headers will
be folded by checking the 'synIDattr' of the item.
E.g. The comment in this code snippet would have been treated as a
Markdown header.
```sh
# This is a comment
echo "Hello world"
```
Addresses an issue metioned in tpope/vim-markdown#10 of adding a
foldtext function.
- Displays == and -- headers as # and ##
- Use markdown header style instead of '+--' to show nesting
Given the example of
This is Header One
==================
This is Header Two
-----------------
### This is Header Three
This is a normal line
Instead of:
+-- 6 lines: This is Header One-----------------------------
+--- 4 lines: This is Header Two----------------------------
+---- 2 lines: ### This is Header Three---------------------
You get:
# This is Header One [6 lines]-------------------------------
## This is Header Two [4 lines]------------------------------
### This is Header Three [2 lines]----------------------------