masukomi / masukomi/vim-markdown-folding
Python's metadata extension breaks vim-folding
Nobody has claimed this yet.
- Dominant language
- Vim Script
- Stars
- 257
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
The python markdown extension supports _YAML-like_ frontmatter for storing meta-data in markdown documents ([ref](https://pythonhosted.org/Markdown/extensions/meta_data.html)). I just encountered this with [pelican](http://blog.getpelican.com/), which unfortunately doesn't support YAML frontmatter (which vim-markdown-folding does seem to work with).
Having the metadata tags at the start of the document is just like YAML, but without the dashes:
```
Title: Dangit
slug: vim-markdown-folding-is-awesome
Date: 2015-02-10
Author: @nfarrar
## It broke
:(
```
Any chance it'd be possible to add support? It is the primary python markdown library. :)
EDIT: I did finally get YAML frontmatter implimented and after using it for a bit - I realized that while it doesn't completely break vim-markdown-folding, it creates a fold in the middle of the YAML front matter. For example:
```
---
Title: Its Going Down
Date: 2015-02-10
Status: Published
---
```
will fold to:
```
---
Title: Its Going Down
Date: 2015-02-10
## Status: Published [# lines] ---------------------------------------
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Python-style metadata and YAML frontmatter examples from the issue in vim-markdown-folding, then inspect the folding logic that processes these lines. Done means metadata at the document start no longer creates an incorrect fold, while normal Markdown section folding continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, python, vim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100