mirror of
https://github.com/amix/vimrc
synced 2025-07-01 04:35:00 +08:00
Updated vim plugins
This commit is contained in:
116
sources_non_forked/vim-markdown/test/header-decrease.vader
Normal file
116
sources_non_forked/vim-markdown/test/header-decrease.vader
Normal file
@ -0,0 +1,116 @@
|
||||
Given markdown;
|
||||
# a
|
||||
|
||||
## b
|
||||
|
||||
### c
|
||||
|
||||
#### d
|
||||
|
||||
##### e
|
||||
|
||||
Execute (HeaderIncrease without forbidden level):
|
||||
:HeaderIncrease
|
||||
|
||||
Expect (increase level of all headers):
|
||||
## a
|
||||
|
||||
### b
|
||||
|
||||
#### c
|
||||
|
||||
##### d
|
||||
|
||||
###### e
|
||||
|
||||
Given markdown;
|
||||
# a
|
||||
|
||||
###### b
|
||||
|
||||
Execute (HeaderIncrease with forbidden level):
|
||||
:HeaderIncrease
|
||||
|
||||
Expect (no changes):
|
||||
# a
|
||||
|
||||
###### b
|
||||
|
||||
Given markdown;
|
||||
## a
|
||||
|
||||
### b
|
||||
|
||||
#### c
|
||||
|
||||
##### d
|
||||
|
||||
###### e
|
||||
|
||||
Execute (HeaderDecrease without forbidden level):
|
||||
:HeaderDecrease
|
||||
|
||||
Expect (decrease level of all headers):
|
||||
# a
|
||||
|
||||
## b
|
||||
|
||||
### c
|
||||
|
||||
#### d
|
||||
|
||||
##### e
|
||||
|
||||
Given markdown;
|
||||
# a
|
||||
|
||||
## b
|
||||
|
||||
### c
|
||||
|
||||
#### d
|
||||
|
||||
##### e
|
||||
|
||||
###### f
|
||||
|
||||
Execute (HeaderDecrease with forbidden level):
|
||||
:HeaderDecrease
|
||||
|
||||
Expect (no changes):
|
||||
# a
|
||||
|
||||
## b
|
||||
|
||||
### c
|
||||
|
||||
#### d
|
||||
|
||||
##### e
|
||||
|
||||
###### f
|
||||
|
||||
Given markdown;
|
||||
a
|
||||
=
|
||||
|
||||
b
|
||||
-
|
||||
|
||||
Execute (HeaderIncrease with setext headers):
|
||||
:HeaderIncrease
|
||||
|
||||
Expect (convert to atx headers):
|
||||
## a
|
||||
|
||||
### b
|
||||
|
||||
Given markdown;
|
||||
a
|
||||
-
|
||||
|
||||
Execute (HeaderDecrease with setext headers):
|
||||
:HeaderDecrease
|
||||
|
||||
Expect (convert to atx headers):
|
||||
# a
|
48
sources_non_forked/vim-markdown/test/setextoatx.vader
Normal file
48
sources_non_forked/vim-markdown/test/setextoatx.vader
Normal file
@ -0,0 +1,48 @@
|
||||
Given markdown;
|
||||
# a
|
||||
|
||||
a
|
||||
=
|
||||
|
||||
## b
|
||||
|
||||
b
|
||||
-
|
||||
|
||||
Execute (SetexToAtx):
|
||||
:SetexToAtx
|
||||
|
||||
Expect (convert setex-style headings to atx):
|
||||
# a
|
||||
|
||||
# a
|
||||
|
||||
## b
|
||||
|
||||
## b
|
||||
|
||||
Given markdown;
|
||||
a
|
||||
=
|
||||
|
||||
b
|
||||
=
|
||||
|
||||
c
|
||||
-
|
||||
|
||||
d
|
||||
-
|
||||
|
||||
Execute (SetexToAtx with range):
|
||||
:1,8SetexToAtx
|
||||
|
||||
Expect (only convert setex headings in original range):
|
||||
# a
|
||||
|
||||
# b
|
||||
|
||||
## c
|
||||
|
||||
d
|
||||
-
|
@ -2,6 +2,7 @@ Before:
|
||||
unlet! b:mkd_known_filetypes
|
||||
unlet! b:mkd_included_filetypes
|
||||
unlet! g:vim_markdown_math
|
||||
unlet! b:liquid_subtype
|
||||
|
||||
Given markdown;
|
||||
a **b** c
|
||||
@ -855,6 +856,17 @@ a
|
||||
Execute (fenced code block with extended info strings):
|
||||
AssertEqual SyntaxOf('a'), 'mkdCode'
|
||||
|
||||
Given liquid;
|
||||
```vim
|
||||
let g:a = 1
|
||||
```
|
||||
|
||||
Execute (fenced code block syntax in liquid file with markdown subtype):
|
||||
let b:liquid_subtype = 'markdown'
|
||||
let b:func = Markdown_GetFunc('vim-markdown/ftplugin/markdown.vim', 'MarkdownRefreshSyntax')
|
||||
call b:func(0)
|
||||
AssertEqual SyntaxOf('g:a'), 'vimVar'
|
||||
|
||||
# Code Blocks in pre and code tag
|
||||
|
||||
Given markdown;
|
||||
|
Reference in New Issue
Block a user