File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 11" Vim plugin for automated bulleted lists
2- " Last Change: Tue 18 Apr 2017
2+ " Last Change: Sun 15 Oct 2017
33" Maintainer: Dorian Karter
44" License: MIT
55" FileTypes: markdown, text, gitcommit
@@ -85,7 +85,7 @@ fun! s:match_roman_list_item(input_text)
8585endfun
8686
8787fun ! s: match_bullet_list_item (input_text)
88- let l: std_bullet_regex = ' \v(^\s*(-|*|\\item)( \[[x ]?\])? )(.*)'
88+ let l: std_bullet_regex = ' \v(^\s*(-|*|#.| \\item)( \[[x ]?\])? )(.*)'
8989 let l: matches = matchlist (a: input_text , l: std_bullet_regex )
9090
9191 if empty (l: matches )
Original file line number Diff line number Diff line change 5353 EOF
5454 end
5555
56+ it 'adds a pandoc bullet if the prev line had one' do
57+ filename = "#{ SecureRandom . hex ( 6 ) } .md"
58+ write_file ( filename , <<-EOF )
59+ Hello there
60+ #. this is the first bullet
61+ EOF
62+
63+ vim . edit filename
64+ vim . type 'GA'
65+ vim . feedkeys '\<cr>'
66+ vim . type 'second bullet'
67+ vim . write
68+
69+ file_contents = IO . read ( filename )
70+
71+ expect ( file_contents ) . to eq normalize_string_indent ( <<-EOF )
72+ Hello there
73+ #. this is the first bullet
74+ #. second bullet\n
75+ EOF
76+ end
77+
5678 it 'adds a new numeric bullet if the previous line had numeric bullet' do
5779 filename = "#{ SecureRandom . hex ( 6 ) } .md"
5880 write_file ( filename , <<-EOF )
96118 second line\n
97119 EOF
98120 end
121+
99122 it 'adds a new roman numeral bullet' do
100123 filename = "#{ SecureRandom . hex ( 6 ) } .md"
101124 write_file ( filename , <<-EOF )
Original file line number Diff line number Diff line change 11require 'vimrunner'
22require 'vimrunner/rspec'
3+ require 'securerandom'
34
45Vimrunner ::RSpec . configure do |config |
56 # Use a single Vim instance for the test suite. Set to false to use an
You can’t perform that action at this time.
0 commit comments