Permalink
Browse files

Match trailing space that signals a line break

  • Loading branch information...
1 parent 6c1e41e commit cd24eb621e920b3e80977b9deb1cc6e6f775841b @tpope tpope committed Feb 25, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 syntax/markdown.vim
View
@@ -20,7 +20,7 @@ syn match markdownValid '&\%(#\=\w*;\)\@!'
syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock
syn cluster markdownBlock contains=markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6,markdownBlockquote,markdownListMarker,markdownOrderedListMarker,markdownCodeBlock,markdownRule
-syn cluster markdownInline contains=markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop
+syn cluster markdownInline contains=markdownLineBreak,markdownLinkText,markdownItalic,markdownBold,markdownCode,markdownEscape,@htmlTop
syn match markdownH1 ".\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule
syn match markdownH2 ".\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule
@@ -47,6 +47,8 @@ syn match markdownRule "- *- *-[ -]*$" contained
syn region markdownYamlHead start="\%^---$" end="^---\s*$" keepend contains=@markdownYamlTop
+syn match markdownLineBreak "\s\{2,\}$"
+
syn region markdownIdDeclaration matchgroup=markdownLinkDelimiter start="^\s\{0,2\}!\=\[" end="\]:" oneline keepend nextgroup=markdownUrl skipwhite
syn match markdownUrl "\S\+" nextgroup=markdownUrlTitle skipwhite contained
syn region markdownUrl matchgroup=markdownUrlDelimiter start="<" end=">" oneline keepend nextgroup=markdownUrlTitle skipwhite contained

0 comments on commit cd24eb6

Please sign in to comment.