File: html_blockquote.vader

package info (click to toggle)
vim-vimwiki 2024.01.24-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,692 kB
  • sloc: sh: 313; makefile: 2
file content (170 lines) | stat: -rw-r--r-- 2,842 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Blockquotes in html convertion #55
# TODO replace remove newline before end of pre tag: \n</pre></code> -> </pre></code>


Given (Issue 2: BlockQuote restarts list numbering {{{3):
  # Item 1
  # Item 2

       Block Quote Text
  # Item 3

Execute (2Html):
  call ConvertWiki2Body()
  1d | $d | $d

Expect (Tested by hand 2):
  <ul>
  <li>
  Item 1

  <li>
  Item 2
  <pre><code>Block Quote Text
  </code></pre>

  <li>
  Item 3

  </ul>

Given vimwiki (Issue 1007: List with hard wraps and a blockquote):
  - Item 1
    wraps to the second line.
      This is a blockquote.

    And this is back to the list item
  - [ ] Item 2
        wraps to the second line.
          This is a blockquote.

        And this is back to the list item

Execute (2Html):
  call ConvertWiki2Body() | 1d | $d | $d

Expect (No blockquote):
  <ul>
  <li>
  Item 1
    wraps to the second line.
  <pre><code>This is a blockquote.
  </code></pre>
  </code></pre>
    And this is back to the list item

  <li class="done0">
  Item 2
        wraps to the second line.
  <pre><code>This is a blockquote.
  </code></pre>
  And this is back to the list item

  </ul>

#Given (Issue 3: BlockQuote at multiple list levels {{{3):
#  1. Outer Item 1
#      1. Inner Item 1
#
#          > quote 1
#
#      2. Inner Item 2
#  2. Outer Item 2
#
#  > quote 2
#
#Execute (2Html):
#  call ConvertWiki2Body()
#  1d | $d | $d
#
#Expect (Got with pandoc):


Given (Issue 5: Newlines in blockquotes are not honored {{{3):
  Before

      line 1
      line 2
  After

Execute (2Html):
  call ConvertWiki2Body()
  1d | $d | $d

Expect (Got with pandoc 5):
  <p>
  Before
  </p>
  <pre><code>line 1
  line 2
  </code></pre>
  <p>
  After
  </p>


Given (Void: Basic test {{{1):

Execute (Edit TestHtml Wiki):
  edit $HOME/testwiki/TestHtml.wiki
  AssertEqual $HOME . '/testwiki/TestHtml.wiki', expand('%')
  AssertEqual 'default', vimwiki#vars#get_wikilocal('syntax')
  AssertEqual 0, vimwiki#vars#get_bufferlocal('wiki_nr')

Do (Markdown with arrow blockquotes):
  :edit $HOME/testwiki/TestHtml.wiki\<CR>
  ggdGi first paragraph\<CR>\<CR>
  > block\<CR>
  > quote\<CR>\<CR>
  last paragraph\<CR>\<Esc>
  :write\<CR>


Execute (Save and Convert to html):
  edit $HOME/testwiki/TestHtml.wiki
  Vimwiki2HTML


#Given (Void):
#
#
#Do (Get Html body):
#  :read $HOME/html/default/TestHtml.html\<CR>
## Goto body
#  gg/<body>\<CR>
## Copy in b
#  "bdat
## Delete All
#  ggdG
## Paste body
#  "bP
## Remove last line
#  Gdd
## Save (Not necessary)
#  :write
#
#
#
#Expect (Plain Html):
## the whole default html file should be here as a base + the modifications
## from "Given"
#  <body>
#
#  <p>
#   first paragraph
#  </p>
#
#  <blockquote>
#  <p>
#  block
#  quote
#  </p>
#  </blockquote>
#
#  <p>
#   last paragraph
#  </p>
#
#  </body>
#
## vim: sw=2:foldlevel=30:foldmethod=indent: