aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-01-01 04:12:00 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-01-01 04:12:00 +0000
commitc7149d317fb644187e5677888b33369227205717 (patch)
tree100163843b8013732e10a40d7a9137bdbd96fe3d
parent41aff1cf5572bb3840aaeaecf1e21fe36e181730 (diff)
downloadpandoc-c7149d317fb644187e5677888b33369227205717.tar.gz
Docbook writer: use unicode instead of entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1769 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs6
-rw-r--r--tests/writer.docbook13
2 files changed, 9 insertions, 10 deletions
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs
index 4542176f1..294c043e2 100644
--- a/src/Text/Pandoc/Writers/Docbook.hs
+++ b/src/Text/Pandoc/Writers/Docbook.hs
@@ -244,9 +244,9 @@ inlineToDocbook opts (Quoted _ lst) =
inlineToDocbook opts (Cite _ lst) =
inlinesToDocbook opts lst
inlineToDocbook _ Apostrophe = char '\''
-inlineToDocbook _ Ellipses = text "&#8230;"
-inlineToDocbook _ EmDash = text "&#8212;"
-inlineToDocbook _ EnDash = text "&#8211;"
+inlineToDocbook _ Ellipses = text "…"
+inlineToDocbook _ EmDash = text "—"
+inlineToDocbook _ EnDash = text "–"
inlineToDocbook _ (Code str) =
inTagsSimple "literal" $ text (escapeStringForXML str)
inlineToDocbook opts (Math _ str) = inlinesToDocbook opts $ readTeXMath str
diff --git a/tests/writer.docbook b/tests/writer.docbook
index 46d02f765..d4d771bc3 100644
--- a/tests/writer.docbook
+++ b/tests/writer.docbook
@@ -605,7 +605,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
Should not be a list item:
</para>
<para>
- M.A.&#160;2007
+ M.A. 2007
</para>
<para>
B. Williams
@@ -1025,12 +1025,11 @@ Blah
<para>
Superscripts: a<superscript>bc</superscript>d
a<superscript><emphasis>hello</emphasis></superscript>
- a<superscript>hello&#160;there</superscript>.
+ a<superscript>hello there</superscript>.
</para>
<para>
Subscripts: H<subscript>2</subscript>O,
- H<subscript>23</subscript>O,
- H<subscript>many&#160;of&#160;them</subscript>O.
+ H<subscript>23</subscript>O, H<subscript>many of them</subscript>O.
</para>
<para>
These should not be superscripts or subscripts, because of the
@@ -1060,13 +1059,13 @@ Blah
<quote><ulink url="http://example.com/?foo=1&amp;bar=2">quoted link</ulink></quote>.
</para>
<para>
- Some dashes: one&#8212;two &#8212; three&#8212;four &#8212; five.
+ Some dashes: one—two — three—four — five.
</para>
<para>
- Dashes between numbers: 5&#8211;7, 255&#8211;66, 1987&#8211;1999.
+ Dashes between numbers: 5–7, 255–66, 1987–1999.
</para>
<para>
- Ellipses&#8230;and&#8230;and&#8230;.
+ Ellipses…and…and….
</para>
</section>
<section id="latex">