git.iko.soy/typeable/pandoc
on master help sign in
Don't add entities in <code> blocks in dokuwiki writer (#386)
commit4c48433a2aaae080acbd74450bd5f70b714475be authorclaremacrae <github@cfmacrae.fastmail.co.uk> dateSat 17 Aug 2013, 12:20 (13 years ago) parent573bd1b
2 files changed+11−11
src/Text/Pandoc/Writers/DokuWiki.hs+1−1 tests/writer.dokuwiki+10−10
src/Text/Pandoc/Writers/DokuWiki.hs+1−1
@@ -143,7 +143,7 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
143143 let (beg, end) = if null at
144144 then ("<code" ++ if null classes then ">" else " class=\"" ++ unwords classes ++ "\">", "</code>")
145145 else ("<source lang=\"" ++ head at ++ "\">", "</source>")
146− return $ beg ++ escapeString str ++ end
146+ return $ beg ++ str ++ end
147147
148148blockToDokuWiki opts (BlockQuote blocks) = do
149149 contents <- blockListToDokuWiki opts blocks
tests/writer.dokuwiki+10−10
@@ -51,7 +51,7 @@ E-mail style:
5151<blockquote>Code in a block quote:
5252
5353<code>sub status {
54− print &quot;working&quot;;
54+ print "working";
5555}</code>
5656A list:
5757
@@ -78,7 +78,7 @@ Code:
7878<code>---- (should be four hyphens)
7979
8080sub status {
81− print &quot;working&quot;;
81+ print "working";
8282}
8383
8484this code block is indented by one tab</code>
@@ -86,7 +86,7 @@ And:
8686
8787<code> this code block is indented by two tabs
8888
89−These should not be escaped: \$ \\ \&gt; \[ \{</code>
89+These should not be escaped: \$ \\ \> \[ \{</code>
9090
9191----
9292
@@ -352,12 +352,12 @@ foo
352352
353353This should be a code block, though:
354354
355−<code>&lt;div&gt;
355+<code><div>
356356 foo
357−&lt;/div&gt;</code>
357+</div></code>
358358As should this:
359359
360−<code>&lt;div&gt;foo&lt;/div&gt;</code>
360+<code><div>foo</div></code>
361361Now, nested:
362362
363363<div>
@@ -386,14 +386,14 @@ Blah
386386
387387Code block:
388388
389−<code>&lt;!-- Comment --&gt;</code>
389+<code><!-- Comment --></code>
390390Just plain comment, with trailing spaces on the line:
391391
392392<!-- foo -->
393393
394394Code:
395395
396−<code>&lt;hr /&gt;</code>
396+<code><hr /></code>
397397Hr’s:
398398
399399<hr>
@@ -617,7 +617,7 @@ An e-mail address: [[mailto:nobody@nowhere.net|nobody@nowhere.net]]
617617</blockquote>
618618Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
619619
620−<code>or here: &lt;http://example.com/&gt;</code>
620+<code>or here: <http://example.com/></code>
621621
622622----
623623
@@ -639,7 +639,7 @@ Here is a footnote reference,((Here is the footnote. It can go anywhere after th
639639
640640Subsequent blocks are indented to show that they belong to the footnote (as with list items).
641641
642−<code> { &lt;code&gt; }</code>
642+<code> { <code> }</code>
643643If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
644644)) 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 <code>]</code> verbatim characters, as well as [bracketed text].
645645))