Skip to content

Commit 12e6683

Browse files
committed
Fix: Setext Style headings must contain a line with only equal signs or dashes, ref #11
1 parent dc84a09 commit 12e6683

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ftplugin/markdown.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ endif
1414
let g:GFMHeadingIds = {}
1515

1616
function! s:HeadingLineRegex()
17-
return '\v(^.+$\n\=+|^.+$\n\-+|^#{1,6})'
17+
return '\v(^.+$\n^\=+$|^.+$\n^\-+$|^#{1,6})'
1818
endfunction
1919

2020
function! s:GetSections(beginRegex, endRegex)

test/GFM.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,15 @@
1515
heading1
1616
===
1717

18+
not heading1
19+
===ha
20+
1821
heading2
1922
--
2023

24+
not heading2
25+
---ha
26+
2127
===
2228

2329
---

0 commit comments

Comments
 (0)