git.iko.soy/typeable/pandoc
on master help sign in
Implemented Emphasis (italic) and Strong (bold) for dokuwiki (#386)
2afa4ecClare Macrae
src/Text/Pandoc/Writers/DokuWiki.hs+2−2
@@ -335,11 +335,11 @@ inlineToDokuWiki :: WriterOptions -> Inline -> State WriterState String
335
335
336inlineToDokuWiki opts (Emph lst) = do
336inlineToDokuWiki opts (Emph lst) = do
337 contents <- inlineListToDokuWiki opts lst
337 contents <- inlineListToDokuWiki opts lst
338− return $ "''" ++ contents ++ "''"
338+ return $ "//" ++ contents ++ "//"
339
339
340inlineToDokuWiki opts (Strong lst) = do
340inlineToDokuWiki opts (Strong lst) = do
341 contents <- inlineListToDokuWiki opts lst
341 contents <- inlineListToDokuWiki opts lst
342− return $ "'''" ++ contents ++ "'''"
342+ return $ "**" ++ contents ++ "**"
343
343
344inlineToDokuWiki opts (Strikeout lst) = do
344inlineToDokuWiki opts (Strikeout lst) = do
345 contents <- inlineListToDokuWiki opts lst
345 contents <- inlineListToDokuWiki opts lst
tests/writer.dokuwiki+18−18
@@ -7,7 +7,7 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
7
7
8===== Level 2 with an [[url|embedded link]] =====
8===== Level 2 with an [[url|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
@@ -270,10 +270,10 @@ Loose:
270Multiple blocks with italics:
270Multiple blocks with italics:
271
271
272<dl>
272<dl>
273−<dt>''apple''</dt>
273+<dt>//apple//</dt>
274<dd><p>red fruit</p>
274<dd><p>red fruit</p>
275<p>contains seeds, crisp, pleasant to taste</p></dd>
275<p>contains seeds, crisp, pleasant to taste</p></dd>
276−<dt>''orange''</dt>
276+<dt>//orange//</dt>
277<dd><p>orange fruit</p>
277<dd><p>orange fruit</p>
278<pre>{ orange code block }</pre>
278<pre>{ orange code block }</pre>
279<blockquote><p>orange block quote</p></blockquote></dd></dl>
279<blockquote><p>orange block quote</p></blockquote></dd></dl>
@@ -332,10 +332,10 @@ Interpreted markdown in a table:
332<table>
332<table>
333<tr>
333<tr>
334<td>
334<td>
335−This is ''emphasized''
335+This is //emphasized//
336</td>
336</td>
337<td>
337<td>
338−And this is '''strong'''
338+And this is **strong**
339</td>
339</td>
340</tr>
340</tr>
341</table>
341</table>
@@ -418,25 +418,25 @@ Hr’s:
418
418
419====== Inline Markup ======
419====== Inline Markup ======
420
420
421−This is ''emphasized'', and so ''is this''.
421+This is //emphasized//, and so //is this//.
422
422
423−This is '''strong''', and so '''is this'''.
423+This is **strong**, and so **is this**.
424
424
425−An ''[[url|emphasized link]]''.
425+An //[[url|emphasized link]]//.
426
426
427−'''''This is strong and em.'''''
427+**//This is strong and em.//**
428
428
429−So is '''''this''''' word.
429+So is **//this//** word.
430
430
431−'''''This is strong and em.'''''
431+**//This is strong and em.//**
432
432
433−So is '''''this''''' word.
433+So is **//this//** word.
434
434
435This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.
435This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.
436
436
437−<s>This is ''strikeout''.</s>
437+<s>This is //strikeout//.</s>
438
438
439−Superscripts: a<sup>bc</sup>d a<sup>''hello''</sup> a<sup>hello there</sup>.
439+Superscripts: a<sup>bc</sup>d a<sup>//hello//</sup> a<sup>hello there</sup>.
440
440
441Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.
441Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.
442
442
@@ -480,9 +480,9 @@ Ellipses…and…and….
480These shouldn’t be math:
480These shouldn’t be math:
481
481
482* To get the famous equation, write <code>$e = mc^2$</code>.
482* To get the famous equation, write <code>$e = mc^2$</code>.
483−* $22,000 is a ''lot'' of money. So is $34,000. (It worked if “lot” is emphasized.)
483+* $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.)
484* Shoes ($20) and socks ($5).
484* Shoes ($20) and socks ($5).
485−* Escaped <code>$</code>: $73 ''this should be emphasized'' 23$.
485+* Escaped <code>$</code>: $73 //this should be emphasized// 23$.
486
486
487Here’s a LaTeX table:
487Here’s a LaTeX table:
488
488
@@ -640,7 +640,7 @@ Subsequent blocks are indented to show that they belong to the footnote (as with
640
640
641<pre> { &lt;code&gt; }</pre>
641<pre> { &lt;code&gt; }</pre>
642If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
642If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
643−</ref> This should ''not'' be a footnote reference, because it contains a space.[^my note] Here is an inline note.<ref>This is ''easier'' to type. Inline notes may contain [http://google.com links] and <code>]</code> verbatim characters, as well as [bracketed text].
643+</ref> This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.<ref>This is //easier// to type. Inline notes may contain [http://google.com links] and <code>]</code> verbatim characters, as well as [bracketed text].
644</ref>
644</ref>
645
645
646<blockquote>Notes can go in quotes.<ref>In quote.
646<blockquote>Notes can go in quotes.<ref>In quote.