Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add match groups for each HTML heading level #662

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions syntax/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained

"HTML headings
syn region htmlH1 matchgroup=mkdHeading start="^\s*#" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH2 matchgroup=mkdHeading start="^\s*##" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH3 matchgroup=mkdHeading start="^\s*###" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH4 matchgroup=mkdHeading start="^\s*####" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH5 matchgroup=mkdHeading start="^\s*#####" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH6 matchgroup=mkdHeading start="^\s*######" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH1 matchgroup=mkdHeadingH1 start="^\s*#" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH2 matchgroup=mkdHeadingH2 start="^\s*##" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH3 matchgroup=mkdHeadingH3 start="^\s*###" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH4 matchgroup=mkdHeadingH4 start="^\s*####" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH5 matchgroup=mkdHeadingH5 start="^\s*#####" end="$" contains=@mkdHeadingContent,@Spell
syn region htmlH6 matchgroup=mkdHeadingH6 start="^\s*######" end="$" contains=@mkdHeadingContent,@Spell
syn match htmlH1 /^.\+\n=\+$/ contains=@mkdHeadingContent,@Spell
syn match htmlH2 /^.\+\n-\+$/ contains=@mkdHeadingContent,@Spell

Expand Down