git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki output: Implement blockquotes properly

TODO Also implement nested blockquotes.

commitd234157d25e13cdb84e96404dfae610c1ad4b4d6 authorClare Macrae <github@cfmacrae.fastmail.co.uk> dateWed 2 Jul 2014, 21:26 (12 years ago) parent92a962b
2 files changed+14−14
src/Text/Pandoc/Writers/DokuWiki.hs+2−2 tests/writer.dokuwiki+12−12
src/Text/Pandoc/Writers/DokuWiki.hs+2−2
@@ -32,7 +32,7 @@ DokuWiki: <https://www.dokuwiki.org/dokuwiki>
3232
3333{-
3434 [ ] Correct handling of Span
35− [ ] Don't generate <blockquote>...
35+ [ ] Implement nested blockquotes (currently only ever does one level)
3636 [ ] Don't generate lists using <ol> and <ul>
3737 [ ] Implement alignment of text in tables
3838 [ ] Implement comments
@@ -150,7 +150,7 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
150150
151151blockToDokuWiki opts (BlockQuote blocks) = do
152152 contents <- blockListToDokuWiki opts blocks
153− return $ "<blockquote>" ++ contents ++ "</blockquote>"
153+ return $ "> " ++ contents
154154
155155blockToDokuWiki opts (Table capt aligns _ headers rows') = do
156156 let alignStrings = map alignmentToString aligns
tests/writer.dokuwiki+12−12
@@ -45,9 +45,9 @@ There should be a hard line break\\ here.
4545
4646E-mail style:
4747
48−<blockquote>This is a block quote. It is pretty short.
49−</blockquote>
50−<blockquote>Code in a block quote:
48+> This is a block quote. It is pretty short.
49+
50+> Code in a block quote:
5151
5252<code>sub status {
5353 print "working";
@@ -59,10 +59,10 @@ A list:
5959
6060Nested block quotes:
6161
62−<blockquote>nested
63−</blockquote>
64−<blockquote>nested
65−</blockquote></blockquote>
62+> nested
63+
64+> nested
65+
6666This should not be a block quote: 2 > 1.
6767
6868And a following paragraph.
@@ -251,7 +251,7 @@ Multiple blocks with italics:
251251contains seeds, crisp, pleasant to taste
252252 * **//orange//** orange fruit
253253<code>{ orange code block }</code>
254−<blockquote>orange block quote</blockquote>
254+> orange block quote
255255
256256Multiple definitions, tight:
257257
@@ -568,8 +568,8 @@ With an ampersand: http://example.com/?foo=1&bar=2
568568
569569An e-mail address: [[mailto:nobody@nowhere.net|nobody@nowhere.net]]
570570
571−<blockquote>Blockquoted: http://example.com/
572−</blockquote>
571+> Blockquoted: http://example.com/
572+
573573Auto-links should not occur here: ''%%<http://example.com/>%%''
574574
575575<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
599599)) 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].
600600))
601601
602−<blockquote>Notes can go in quotes.((In quote.
602+> Notes can go in quotes.((In quote.
603603))
604−</blockquote>
604+
605605 - And in list items.((In list.))
606606
607607This paragraph should not be part of the note, as it is not indented.