Skip to content

Commit d23846e

Browse files
committed
Add tests for empty atx headings
1 parent 5a3996b commit d23846e

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

test/header-decrease.vader

+26
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,29 @@ Expect (hashtags are not affected):
115115
## a
116116

117117
#hashtag
118+
119+
Given markdown;
120+
#
121+
122+
##
123+
124+
Execute (HeaderIncrease with empty atx headings):
125+
:HeaderIncrease
126+
127+
Expect (increase level of all headers):
128+
##
129+
130+
###
131+
132+
Given markdown;
133+
##
134+
135+
###
136+
137+
Execute (HeaderDecrease with empty atx headings):
138+
:HeaderDecrease
139+
140+
Expect (decrease level of all headers):
141+
#
142+
143+
##

test/map.vader

+20
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,23 @@ Execute (]h):
157157
AssertEqual line('.'), 3
158158
normal ]h
159159
AssertEqual line('.'), 1
160+
161+
Given markdown;
162+
#
163+
164+
##
165+
166+
#
167+
168+
##
169+
170+
Execute (]] empty atx heading):
171+
AssertEqual line('.'), 1
172+
normal ]]
173+
AssertEqual line('.'), 3
174+
normal [[
175+
AssertEqual line('.'), 1
176+
normal ][
177+
AssertEqual line('.'), 5
178+
normal []
179+
AssertEqual line('.'), 1

0 commit comments

Comments
 (0)