aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclaremacrae <github@cfmacrae.fastmail.co.uk>2013-08-17 12:20:34 +0100
committerclaremacrae <github@cfmacrae.fastmail.co.uk>2013-08-17 12:20:34 +0100
commit4c48433a2aaae080acbd74450bd5f70b714475be (patch)
tree5713f9255c0121d877c5d13c111ea082d3295ed9
parent573bd1b61b58e66c1e0ecfb4e74928a9d9d27daf (diff)
downloadpandoc-4c48433a2aaae080acbd74450bd5f70b714475be.tar.gz
Don't add entities in <code> blocks in dokuwiki writer (#386)
-rw-r--r--src/Text/Pandoc/Writers/DokuWiki.hs2
-rw-r--r--tests/writer.dokuwiki20
2 files changed, 11 insertions, 11 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs
index 97b1705d1..b9eb444b3 100644
--- a/src/Text/Pandoc/Writers/DokuWiki.hs
+++ b/src/Text/Pandoc/Writers/DokuWiki.hs
@@ -143,7 +143,7 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do
let (beg, end) = if null at
then ("<code" ++ if null classes then ">" else " class=\"" ++ unwords classes ++ "\">", "</code>")
else ("<source lang=\"" ++ head at ++ "\">", "</source>")
- return $ beg ++ escapeString str ++ end
+ return $ beg ++ str ++ end
blockToDokuWiki opts (BlockQuote blocks) = do
contents <- blockListToDokuWiki opts blocks
diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki
index b9a8a3c05..489726a76 100644
--- a/tests/writer.dokuwiki
+++ b/tests/writer.dokuwiki
@@ -51,7 +51,7 @@ E-mail style:
<blockquote>Code in a block quote:
<code>sub status {
- print &quot;working&quot;;
+ print "working";
}</code>
A list:
@@ -78,7 +78,7 @@ Code:
<code>---- (should be four hyphens)
sub status {
- print &quot;working&quot;;
+ print "working";
}
this code block is indented by one tab</code>
@@ -86,7 +86,7 @@ And:
<code> this code block is indented by two tabs
-These should not be escaped: \$ \\ \&gt; \[ \{</code>
+These should not be escaped: \$ \\ \> \[ \{</code>
----
@@ -352,12 +352,12 @@ foo
This should be a code block, though:
-<code>&lt;div&gt;
+<code><div>
foo
-&lt;/div&gt;</code>
+</div></code>
As should this:
-<code>&lt;div&gt;foo&lt;/div&gt;</code>
+<code><div>foo</div></code>
Now, nested:
<div>
@@ -386,14 +386,14 @@ Blah
Code block:
-<code>&lt;!-- Comment --&gt;</code>
+<code><!-- Comment --></code>
Just plain comment, with trailing spaces on the line:
<!-- foo -->
Code:
-<code>&lt;hr /&gt;</code>
+<code><hr /></code>
Hr’s:
<hr>
@@ -617,7 +617,7 @@ An e-mail address: [[mailto:nobody@nowhere.net|nobody@nowhere.net]]
</blockquote>
Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
-<code>or here: &lt;http://example.com/&gt;</code>
+<code>or here: <http://example.com/></code>
----
@@ -639,7 +639,7 @@ Here is a footnote reference,((Here is the footnote. It can go anywhere after th
Subsequent blocks are indented to show that they belong to the footnote (as with list items).
-<code> { &lt;code&gt; }</code>
+<code> { <code> }</code>
If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
)) 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].
))