git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'claremacrae-dokuwiki'.

Use removeFormatting from Shared instead of the custom unfancy function.

commit5df812f7eb9e2d26ffc26b5ba0644a8ae3016629 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 13 Jul 2014, 14:33 (12 years ago) parent172a184c743128
2 files changed+7−5
src/Text/Pandoc/Writers/DokuWiki.hs+4−2 tests/writer.dokuwiki+3−3
src/Text/Pandoc/Writers/DokuWiki.hs+4−2
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2121 Copyright : Copyright (C) 2008-2014 John MacFarlane
2222 License : GNU GPL, version 2 or above
2323
24− Maintainer : John MacFarlane <jgm@berkeley.edu>
24+ Maintainer : Clare Macrae <clare.macrae@googlemail.com>
2525 Stability : alpha
2626 Portability : portable
2727
@@ -126,7 +126,9 @@ blockToDokuWiki _ (RawBlock f str)
126126blockToDokuWiki _ HorizontalRule = return "\n----\n"
127127
128128blockToDokuWiki opts (Header level _ inlines) = do
129− contents <- inlineListToDokuWiki opts inlines
129+ -- emphasis, links etc. not allowed in headers, apparently,
130+ -- so we remove formatting:
131+ contents <- inlineListToDokuWiki opts $ removeFormatting inlines
130132 let eqs = replicate ( 7 - level ) '='
131133 return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
132134
tests/writer.dokuwiki+3−3
@@ -5,9 +5,9 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
55
66====== Headers ======
77
8−===== Level 2 with an [[url|embedded link]] =====
8+===== Level 2 with an embedded link =====
99
10−==== Level 3 with //emphasis// ====
10+==== Level 3 with emphasis ====
1111
1212=== Level 4 ===
1313
@@ -15,7 +15,7 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
1515
1616====== Level 1 ======
1717
18−===== Level 2 with //emphasis// =====
18+===== Level 2 with emphasis =====
1919
2020==== Level 3 ====
2121