mzlogin / vim-markdown-toc

A vim 7.4+ plugin to generate table of contents for Markdown files.
http://www.vim.org/scripts/script.php?script_id=5460
MIT License
609 stars 59 forks source link

Doesn't find if the fence is on the first line but not first column #43

Closed lilydjwg closed 6 years ago

mzlogin commented 6 years ago

Not really understand. In my environment, toc fence on the first line can work fine.

like this:

<!-- vim-markdown-toc GFM -->

* [你好世界](#你好世界)
* [hello](#hello)
* [world](#world)
* [???](#)

<!-- vim-markdown-toc -->

## 你好世界

## hello

## world

## ???

do you mean heading in the first line not contained in the generated toc?

if not, can you give a example for issue?

lilydjwg commented 6 years ago

Oh, it only fails when the cursor isn't on the first column. Then it'll be simple to fix.

mzlogin commented 6 years ago

Yes, that would be a bug when set nostartofline, thx!