git.iko.soy/typeable/pandoc
on master help sign in
Docbook writer: use unicode instead of entities.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1769 788f1e2b-df1e-0410-8736-df70ead52e1b

commitc7149d317fb644187e5677888b33369227205717 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 1 Jan 2010, 04:12 (17 years ago) parent41aff1c
2 files changed+9−10
src/Text/Pandoc/Writers/Docbook.hs+3−3 tests/writer.docbook+6−7
src/Text/Pandoc/Writers/Docbook.hs+3−3
@@ -244,9 +244,9 @@ inlineToDocbook opts (Quoted _ lst) =
244244inlineToDocbook opts (Cite _ lst) =
245245 inlinesToDocbook opts lst
246246inlineToDocbook _ Apostrophe = char '\''
247−inlineToDocbook _ Ellipses = text "&#8230;"
248−inlineToDocbook _ EmDash = text "&#8212;"
249−inlineToDocbook _ EnDash = text "&#8211;"
247+inlineToDocbook _ Ellipses = text "…"
248+inlineToDocbook _ EmDash = text "—"
249+inlineToDocbook _ EnDash = text "–"
250250inlineToDocbook _ (Code str) =
251251 inTagsSimple "literal" $ text (escapeStringForXML str)
252252inlineToDocbook opts (Math _ str) = inlinesToDocbook opts $ readTeXMath str
tests/writer.docbook+6−7
@@ -605,7 +605,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
605605 Should not be a list item:
606606 </para>
607607 <para>
608− M.A.&#160;2007
608+ M.A. 2007
609609 </para>
610610 <para>
611611 B. Williams
@@ -1025,12 +1025,11 @@ Blah
10251025 <para>
10261026 Superscripts: a<superscript>bc</superscript>d
10271027 a<superscript><emphasis>hello</emphasis></superscript>
1028− a<superscript>hello&#160;there</superscript>.
1028+ a<superscript>hello there</superscript>.
10291029 </para>
10301030 <para>
10311031 Subscripts: H<subscript>2</subscript>O,
1032− H<subscript>23</subscript>O,
1033− H<subscript>many&#160;of&#160;them</subscript>O.
1032+ H<subscript>23</subscript>O, H<subscript>many of them</subscript>O.
10341033 </para>
10351034 <para>
10361035 These should not be superscripts or subscripts, because of the
@@ -1060,13 +1059,13 @@ Blah
10601059 <quote><ulink url="http://example.com/?foo=1&amp;bar=2">quoted link</ulink></quote>.
10611060 </para>
10621061 <para>
1063− Some dashes: one&#8212;two &#8212; three&#8212;four &#8212; five.
1062+ Some dashes: one—two — three—four — five.
10641063 </para>
10651064 <para>
1066− Dashes between numbers: 5&#8211;7, 255&#8211;66, 1987&#8211;1999.
1065+ Dashes between numbers: 5–7, 255–66, 1987–1999.
10671066 </para>
10681067 <para>
1069− Ellipses&#8230;and&#8230;and&#8230;.
1068+ Ellipses…and…and….
10701069 </para>
10711070</section>
10721071<section id="latex">