Permalink
Browse files

fix performance issue with detecting setext-style headers

  • Loading branch information...
1 parent 2b18a53 commit 1c8416eb8d169d7c24d463ecdfbd3392bc167169 @thedjinn committed Nov 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 syntax/markdown.vim
View
@@ -21,8 +21,8 @@ syn match markdownLineStart "^[<@]\@!" nextgroup=@markdownBlock
syn cluster markdownBlock contains=markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6,markdownBlockquote,markdownListMarker,markdownOrderedListMarker,markdownCodeBlock,markdownRule
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
+syn match markdownH1 "^.\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule
+syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule
syn match markdownHeadingRule "^[=-]\+$" contained

0 comments on commit 1c8416e

Please sign in to comment.