File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 40
40
41
41
" Helper methods ---------------------------------------- {{{
42
42
fun ! s: match_numeric_list_item (input_text)
43
- let l: num_bullet_regex = ' \v^((\s*)(\d+)(\.|\))(\s* ))(.*)'
43
+ let l: num_bullet_regex = ' \v^((\s*)(\d+)(\.|\))(\s+ ))(.*)'
44
44
let l: matches = matchlist (a: input_text , l: num_bullet_regex )
45
45
46
46
if empty (l: matches )
Original file line number Diff line number Diff line change 75
75
EOF
76
76
end
77
77
78
+ it 'does not insert a new numeric bullet for decimal numbers' do
79
+ filename = "#{ SecureRandom . hex ( 6 ) } .md"
80
+ write_file ( filename , <<-EOF )
81
+ # Hello there
82
+ 3.14159 is an approximation of pi.
83
+ EOF
84
+
85
+ vim . edit filename
86
+ vim . type 'GA'
87
+ vim . feedkeys '\<cr>'
88
+ vim . type 'second line'
89
+ vim . write
90
+
91
+ file_contents = IO . read ( filename )
92
+
93
+ expect ( file_contents ) . to eq normalize_string_indent ( <<-EOF )
94
+ # Hello there
95
+ 3.14159 is an approximation of pi.
96
+ second line\n
97
+ EOF
98
+ end
78
99
it 'adds a new roman numeral bullet' do
79
100
filename = "#{ SecureRandom . hex ( 6 ) } .md"
80
101
write_file ( filename , <<-EOF )
You can’t perform that action at this time.
0 commit comments