git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki output: Implement blockquotes properly
d234157Clare Macrae
src/Text/Pandoc/Writers/DokuWiki.hs+2−2
@@ -32,7 +32,7 @@ DokuWiki: <https://www.dokuwiki.org/dokuwiki>
32
32
33{-
33{-
34 [ ] Correct handling of Span
34 [ ] Correct handling of Span
35− [ ] Don't generate <blockquote>...
35+ [ ] Implement nested blockquotes (currently only ever does one level)
36 [ ] Don't generate lists using <ol> and <ul>
36 [ ] Don't generate lists using <ol> and <ul>
37 [ ] Implement alignment of text in tables
37 [ ] Implement alignment of text in tables
38 [ ] Implement comments
38 [ ] Implement comments
@@ -150,7 +150,7 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
150
150
151blockToDokuWiki opts (BlockQuote blocks) = do
151blockToDokuWiki opts (BlockQuote blocks) = do
152 contents <- blockListToDokuWiki opts blocks
152 contents <- blockListToDokuWiki opts blocks
153− return $ "<blockquote>" ++ contents ++ "</blockquote>"
153+ return $ "> " ++ contents
154
154
155blockToDokuWiki opts (Table capt aligns _ headers rows') = do
155blockToDokuWiki opts (Table capt aligns _ headers rows') = do
156 let alignStrings = map alignmentToString aligns
156 let alignStrings = map alignmentToString aligns
tests/writer.dokuwiki+12−12
@@ -45,9 +45,9 @@ There should be a hard line break\\ here.
45
45
46E-mail style:
46E-mail style:
47
47
48−<blockquote>This is a block quote. It is pretty short.
48+> This is a block quote. It is pretty short.
49−</blockquote>
49+
50−<blockquote>Code in a block quote:
50+> Code in a block quote:
51
51
52<code>sub status {
52<code>sub status {
53 print "working";
53 print "working";
@@ -59,10 +59,10 @@ A list:
59
59
60Nested block quotes:
60Nested block quotes:
61
61
62−<blockquote>nested
62+> nested
63−</blockquote>
63+
64−<blockquote>nested
64+> nested
65−</blockquote></blockquote>
65+
66This should not be a block quote: 2 > 1.
66This should not be a block quote: 2 > 1.
67
67
68And a following paragraph.
68And a following paragraph.
@@ -251,7 +251,7 @@ Multiple blocks with italics:
251contains seeds, crisp, pleasant to taste
251contains seeds, crisp, pleasant to taste
252 * **//orange//** orange fruit
252 * **//orange//** orange fruit
253<code>{ orange code block }</code>
253<code>{ orange code block }</code>
254−<blockquote>orange block quote</blockquote>
254+> orange block quote
255
255
256Multiple definitions, tight:
256Multiple definitions, tight:
257
257
@@ -568,8 +568,8 @@ With an ampersand: http://example.com/?foo=1&bar=2
568
568
569An e-mail address: [[mailto:nobody@nowhere.net|nobody@nowhere.net]]
569An e-mail address: [[mailto:nobody@nowhere.net|nobody@nowhere.net]]
570
570
571−<blockquote>Blockquoted: http://example.com/
571+> Blockquoted: http://example.com/
572−</blockquote>
572+
573Auto-links should not occur here: ''%%<http://example.com/>%%''
573Auto-links should not occur here: ''%%<http://example.com/>%%''
574
574
575<code>or here: <http://example.com/></code>
575<code>or here: <http://example.com/></code>
@@ -599,9 +599,9 @@ If you want, you can indent every line, but you can also be lazy and just indent
599)) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and ''%%]%%'' verbatim characters, as well as [bracketed text].
599)) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and ''%%]%%'' verbatim characters, as well as [bracketed text].
600))
600))
601
601
602−<blockquote>Notes can go in quotes.((In quote.
602+> Notes can go in quotes.((In quote.
603))
603))
604−</blockquote>
604+
605 - And in list items.((In list.))
605 - And in list items.((In list.))
606
606
607This paragraph should not be part of the note, as it is not indented.
607This paragraph should not be part of the note, as it is not indented.