Skip to content

Escaping Link '[' marker #21

Closed
ktr opened this Issue Sep 8, 2011 · 2 comments

4 participants

@ktr
ktr commented Sep 8, 2011

When trying to escape a link marker, vim-markdown still seems to highlight it as if it was a link. For example:

\[test]

I think should just produce [test], not underlined like a link. To accomplish this, you can change:

syn region mkdLink matchgroup=mkdDelimiter start="\!\?\[" end="\]\ze\s*[[(]" contains=@Spell nextgroup=mkdURL,mkdID skipwhite

to:

syn region mkdLink matchgroup=mkdDelimiter start="\!\?\(\\\)\@<!\[" end="\]\ze\s*[[(]" contains=@Spell nextgroup=mkdURL,mkdID skipwhite

In the syntax file.

@fncll
fncll commented Nov 20, 2011

Given that [regular text here in the middle of other text] is acceptable markdown syntax, is there a way to deal with the similar situation of having that kind of text (square bracketed text nor followed by link location in either delimiter) either not highlighted or highlighter properly so that the rest of the text doesn't get highlighted as it does now?

@ajford
ajford commented Mar 25, 2012

I have this same issue. The above listed fix works for getting rid of the highlights caused by normally embedded square brackets, but doesn't work on embedded latex segments, such as \includegraphics[height=1.5in]{foo.jpg}.

Does Markdown support multi-line links? I know one of the mentioned solutions for embedded underscores was to append oneline to their definitions, and that works for this as well, but I'm not sure if that is counter Markdown support.

@plasticboy plasticboy pushed a commit that closed this issue Nov 16, 2012
Ben Williams Closes #21. d96254e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.