git.iko.soy/typeable/pandoc
on master help sign in
Merge branch 'claremacrae-dokuwiki'.
5df812fJohn MacFarlane
src/Text/Pandoc/Writers/DokuWiki.hs+4−2
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 Copyright : Copyright (C) 2008-2014 John MacFarlane
21 Copyright : Copyright (C) 2008-2014 John MacFarlane
22 License : GNU GPL, version 2 or above
22 License : GNU GPL, version 2 or above
23
23
24− Maintainer : John MacFarlane <jgm@berkeley.edu>
24+ Maintainer : Clare Macrae <clare.macrae@googlemail.com>
25 Stability : alpha
25 Stability : alpha
26 Portability : portable
26 Portability : portable
27
27
@@ -126,7 +126,9 @@ blockToDokuWiki _ (RawBlock f str)
126blockToDokuWiki _ HorizontalRule = return "\n----\n"
126blockToDokuWiki _ HorizontalRule = return "\n----\n"
127
127
128blockToDokuWiki opts (Header level _ inlines) = do
128blockToDokuWiki opts (Header level _ inlines) = do
129+ -- emphasis, links etc. not allowed in headers, apparently,
130+ -- so we remove formatting:
129− contents <- inlineListToDokuWiki opts inlines
131+ contents <- inlineListToDokuWiki opts $ removeFormatting inlines
130 let eqs = replicate ( 7 - level ) '='
132 let eqs = replicate ( 7 - level ) '='
131 return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
133 return $ eqs ++ " " ++ contents ++ " " ++ eqs ++ "\n"
132
134
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
5
5
6====== Headers ======
6====== Headers ======
7
7
8−===== Level 2 with an [[url|embedded link]] =====
8+===== Level 2 with an embedded link =====
9
9
10−==== Level 3 with //emphasis// ====
10+==== Level 3 with emphasis ====
11
11
12=== Level 4 ===
12=== Level 4 ===
13
13
@@ -15,7 +15,7 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
15
15
16====== Level 1 ======
16====== Level 1 ======
17
17
18−===== Level 2 with //emphasis// =====
18+===== Level 2 with emphasis =====
19
19
20==== Level 3 ====
20==== Level 3 ====
21
21