@@ -33,55 +33,53 @@ describe('callout.md', function()
3333 local expected = {}
3434
3535 local note_start = 0
36- vim .list_extend (expected , util .heading (note_start , 1 ))
3736 vim .list_extend (expected , {
38- util .quote (note_start + 2 , ' %s ' , info ), -- Quote start
39- callout (note_start + 2 , 2 , 9 , ' Note' , info ), -- Callout text
40- util .quote (note_start + 3 , ' %s' , info ), -- Quote continued
37+ util .heading (note_start , 1 ),
38+ util .quote (note_start + 2 , ' %s ' , info ),
39+ callout (note_start + 2 , 2 , 9 , ' Note' , info ),
40+ util .quote (note_start + 3 , ' %s' , info ),
4141 util .quote (note_start + 4 , ' %s ' , info ),
4242 util .quote (note_start + 5 , ' %s' , info ),
4343 util .quote (note_start + 6 , ' %s ' , info ),
4444 })
4545
4646 local tip_start = 8
47- vim .list_extend (expected , util .heading (tip_start , 1 ))
4847 vim .list_extend (expected , {
49- util .quote (tip_start + 2 , ' %s ' , ok ), -- Quote start
50- callout (tip_start + 2 , 2 , 8 , ' Tip' , ok ), -- Callout text
51- util .quote (tip_start + 3 , ' %s' , ok ), -- Quote continued
48+ util .heading (tip_start , 1 ),
49+ util .quote (tip_start + 2 , ' %s ' , ok ),
50+ callout (tip_start + 2 , 2 , 8 , ' Tip' , ok ),
51+ util .quote (tip_start + 3 , ' %s' , ok ),
5252 util .quote (tip_start + 4 , ' %s ' , ok ),
53- util .code_block_row (tip_start + 4 , 2 ),
54- })
55- vim .list_extend (expected , util .code_language (tip_start + 4 , 5 , 8 , ' lua' ))
56- vim .list_extend (expected , {
53+ util .code_row (tip_start + 4 , 2 ),
54+ util .code_language (tip_start + 4 , 5 , 8 , ' lua' ),
5755 util .quote (tip_start + 5 , ' %s ' , ok ),
58- util .code_block_row (tip_start + 5 , 2 ),
56+ util .code_row (tip_start + 5 , 2 ),
5957 util .quote (tip_start + 6 , ' %s ' , ok ),
6058 util .code_below (tip_start + 6 , 2 ),
6159 })
6260
6361 local important_start = 16
64- vim .list_extend (expected , util .heading (important_start , 1 ))
6562 vim .list_extend (expected , {
66- util .quote (important_start + 2 , ' %s ' , hint ), -- Quote start
67- callout (important_start + 2 , 2 , 14 , ' Important' , hint ), -- Callout text
68- util .quote (important_start + 3 , ' %s ' , hint ), -- Quote continued
63+ util .heading (important_start , 1 ),
64+ util .quote (important_start + 2 , ' %s ' , hint ),
65+ callout (important_start + 2 , 2 , 14 , ' Important' , hint ),
66+ util .quote (important_start + 3 , ' %s ' , hint ),
6967 })
7068
7169 local warning_start = 21
72- vim .list_extend (expected , util .heading (warning_start , 1 ))
7370 vim .list_extend (expected , {
74- util .quote (warning_start + 2 , ' %s ' , warn ), -- Quote start
75- callout (warning_start + 2 , 2 , 12 , ' Custom Title' , warn , ' ' ), -- Callout text
76- util .quote (warning_start + 3 , ' %s ' , warn ), -- Quote continued
71+ util .heading (warning_start , 1 ),
72+ util .quote (warning_start + 2 , ' %s ' , warn ),
73+ callout (warning_start + 2 , 2 , 12 , ' Custom Title' , warn , ' ' ),
74+ util .quote (warning_start + 3 , ' %s ' , warn ),
7775 })
7876
7977 local caution_start = 26
80- vim .list_extend (expected , util .heading (caution_start , 1 ))
8178 vim .list_extend (expected , {
82- util .quote (caution_start + 2 , ' %s ' , error ), -- Quote start
83- callout (caution_start + 2 , 2 , 12 , ' Caution' , error ), -- Callout text
84- util .quote (caution_start + 3 , ' %s ' , error ), -- Quote continued
79+ util .heading (caution_start , 1 ),
80+ util .quote (caution_start + 2 , ' %s ' , error ),
81+ callout (caution_start + 2 , 2 , 12 , ' Caution' , error ),
82+ util .quote (caution_start + 3 , ' %s ' , error ),
8583 })
8684
8785 vim .list_extend (expected , util .heading (31 , 1 ))
0 commit comments