Feature: permit blockquote automatic continuation (issue #1274) (fixed)
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
# Issue: #1274
|
||||
# Feature: Markdown -- Continue blockquote when <CR> is pressed in insert mode.
|
||||
|
||||
|
||||
Given vimwiki (Blockquote with test {{{1):
|
||||
> Dummy text 1
|
||||
|
||||
|
||||
Execute (Set syntax markdown):
|
||||
call SetSyntax('markdown')
|
||||
|
||||
|
||||
Do (Press insert, enter and type):
|
||||
A
|
||||
\<Cr>
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Expect(Marker added 1):
|
||||
> Dummy text 1
|
||||
> Dummy text 2
|
||||
|
||||
|
||||
Do (Press o and type):
|
||||
o
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Expect(Marker added 2):
|
||||
> Dummy text 1
|
||||
> Dummy text 2
|
||||
|
||||
|
||||
Do (Press O and type):
|
||||
O
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Expect(Marker added 3, above):
|
||||
> Dummy text 2
|
||||
> Dummy text 1
|
||||
|
||||
|
||||
Given vimwiki (Blockquote without test {{{1):
|
||||
>
|
||||
|
||||
|
||||
Do (Press insert, enter and type):
|
||||
A
|
||||
\<Cr>
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Expect(Marker removed):
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Do (Press o):
|
||||
o
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Expect(Marker appended, below):
|
||||
>
|
||||
> Dummy text 2
|
||||
|
||||
|
||||
Do (Press O):
|
||||
O
|
||||
Dummy text 2
|
||||
|
||||
|
||||
Expect(Marker appended, above):
|
||||
> Dummy text 2
|
||||
>
|
||||
@@ -5,13 +5,20 @@ Before(Define function for yaml inspection):
|
||||
function! Issue1287Yaml(line)
|
||||
" The line where the yaml delimiter is: 1 if at top
|
||||
let l = a:line
|
||||
|
||||
Log "1: " . string(GetSyntaxStack(l + 0, 2))
|
||||
AssertEqual 'textSnipYAML', GetSyntaxStack(l + 0, 2)[0]
|
||||
Log '2: ' . string(GetSyntaxStack(l + 0, 2))
|
||||
AssertEqual 'VimwikiPre', GetSyntaxStack(l + 0, 2)[1]
|
||||
|
||||
Log '3: ' . string(GetSyntaxStack(l + 1, 2))
|
||||
AssertEqual 'textSnipYAML', GetSyntaxStack(l + 1, 2)[0]
|
||||
Log '4: ' . string(GetSyntaxStack(l + 2, 2))
|
||||
AssertEqual 'textSnipYAML', GetSyntaxStack(l + 2, 2)[0]
|
||||
Log '5: ' . string(GetSyntaxStack(l + 2, 20))
|
||||
AssertEqual 'textSnipYAML', GetSyntaxStack(l + 2, 20)[0]
|
||||
|
||||
Log '6: ' . string(GetSyntaxStack(l + 3, 2))
|
||||
AssertEqual 'VimwikiPre', GetSyntaxStack(l + 3, 2)[-1]
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user