vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

`]` inside link text leads to wrong syntax highlighting #107

Closed ehamberg closed 10 years ago

ehamberg commented 10 years ago

The following line from https://github.com/ehamberg/typeclassopedia-md/blob/336f3c2fcb13b702c254be52700ab2435f6bc986/typeclassopedia.md messes up the syntax highlighting for filetype pandoc:

[Why isn't `ListT []`{.haskell} a monad](http://blog.sigfpe.com/2006/11/why-isnt-listt-monad.html)

The following is a smaller example showing this erroneous behaviour:

[`]`](http://foo.com) foo

It looks like the problem is that ] inside the backticks ends the link text, and the second backtick is taken as the start of another inline code block (that doesn't end).

fmoralesc commented 10 years ago

I fixed this upstream at https://github.com/vim-pandoc/vim-pandoc-syntax/commit/52d7a1bc89c2e85bd2b3621b92c013adb079d97b. It should land in vim-pandoc sometime in the future, but it's recommended to switch to vim-pandoc-syntax + vim-pantondoc.

ehamberg commented 10 years ago

Great. Thanks! I switched to using vim-pandoc-syntax and vim-pantondoc now.