diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-27 22:13:11 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-27 22:13:11 +0000 |
commit | 141affdb5140478464bf3c7331f6be4cf9454dd6 (patch) | |
tree | cf2db2443f46fd355bf62c0b0d4ea703d698fb1d /tests | |
parent | d06417125dd4d8cb177abd2d472c0c1cad4c49be (diff) | |
download | pandoc-141affdb5140478464bf3c7331f6be4cf9454dd6.tar.gz |
More changes in entity handling: Instead of using entities for characters
above 128 in HTML and Docbook output, we now just use unicode. After all,
we're declaring UTF-8 content in the header. This makes the HTML and
docbook files produced by pandoc much more readable and editable.
Changes to Entities.hs:
+ Removed specialCharToEntity
+ Added escapeSGMLChar (which just escapes the basic four, <>&")
+ Modified encodeEntities and stringToSGML to use escapeSGMLChar
+ Removed encodeEntitiesNumerical
+ Rewrote encodeEntities for better performance
+ Rewrote stringToSGML for better performance
git-svn-id: https://pandoc.googlecode.com/svn/trunk@516 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/writer.docbook | 60 | ||||
-rw-r--r-- | tests/writer.html | 10 |
2 files changed, 35 insertions, 35 deletions
diff --git a/tests/writer.docbook b/tests/writer.docbook index 600c52d6a..675a115cc 100644 --- a/tests/writer.docbook +++ b/tests/writer.docbook @@ -89,7 +89,7 @@ </para> <screen> sub status { - print "working"; + print "working"; } </screen> <para> @@ -122,7 +122,7 @@ sub status { </blockquote> </blockquote> <para> - This should not be a block quote: 2 > 1. + This should not be a block quote: 2 > 1. </para> <para> Box-style: @@ -133,7 +133,7 @@ sub status { </para> <screen> sub status { - print "working"; + print "working"; } </screen> </blockquote> @@ -177,7 +177,7 @@ sub status { ---- (should be four hyphens) sub status { - print "working"; + print "working"; } this code block is indented by one tab @@ -188,7 +188,7 @@ this code block is indented by one tab <screen> this code block is indented by two tabs -These should not be escaped: \$ \\ \> \[ \{ +These should not be escaped: \$ \\ \> \[ \{ </screen> </section> <section> @@ -577,9 +577,9 @@ These should not be escaped: \$ \\ \> \[ \{ word. </para> <para> - This is code: <literal>></literal>, <literal>$</literal>, + This is code: <literal>></literal>, <literal>$</literal>, <literal>\</literal>, <literal>\$</literal>, - <literal><html></literal>. + <literal><html></literal>. </para> </section> <section> @@ -602,7 +602,7 @@ These should not be escaped: \$ \\ \> \[ \{ </para> <para> Here is some quoted <quote><literal>code</literal></quote> and a - <quote><ulink url="http://example.com/?foo=1&bar=2">quoted link</ulink></quote>. + <quote><ulink url="http://example.com/?foo=1&bar=2">quoted link</ulink></quote>. </para> <para> Some dashes: one—two—three—four—five. @@ -691,9 +691,9 @@ These should not be escaped: \$ \\ \> \[ \{ </para> <para> <literal>\begin{tabular}{|l|l|}\hline -Animal & Number \\ \hline -Dog & 2 \\ -Cat & 1 \\ \hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline \end{tabular}</literal> </para> </section> @@ -705,44 +705,44 @@ Cat & 1 \\ \hline <itemizedlist> <listitem> <para> - I hat: Î + I hat: Î </para> </listitem> <listitem> <para> - o umlaut: ö + o umlaut: ö </para> </listitem> <listitem> <para> - section: § + section: § </para> </listitem> <listitem> <para> - set membership: ∈ + set membership: ∈ </para> </listitem> <listitem> <para> - copyright: © + copyright: © </para> </listitem> </itemizedlist> <para> - AT&T has an ampersand in their name. + AT&T has an ampersand in their name. </para> <para> - AT&T is another way to write it. + AT&T is another way to write it. </para> <para> - This & that. + This & that. </para> <para> - 4 < 5. + 4 < 5. </para> <para> - 6 > 5. + 6 > 5. </para> <para> Backslash: \ @@ -775,7 +775,7 @@ Cat & 1 \\ \hline Right paren: ) </para> <para> - Greater-than: > + Greater-than: > </para> <para> Hash: # @@ -868,25 +868,25 @@ Cat & 1 \\ \hline <title>With ampersands</title> <para> Here's a - <ulink url="http://example.com/?foo=1&bar=2">link with an ampersand in the URL</ulink>. + <ulink url="http://example.com/?foo=1&bar=2">link with an ampersand in the URL</ulink>. </para> <para> Here's a link with an amersand in the link text: - <ulink url="http://att.com/">AT&T</ulink>. + <ulink url="http://att.com/">AT&T</ulink>. </para> <para> - Here's an <ulink url="/script?foo=1&bar=2">inline link</ulink>. + Here's an <ulink url="/script?foo=1&bar=2">inline link</ulink>. </para> <para> Here's an - <ulink url="/script?foo=1&bar=2">inline link in pointy braces</ulink>. + <ulink url="/script?foo=1&bar=2">inline link in pointy braces</ulink>. </para> </section> <section> <title>Autolinks</title> <para> With an ampersand: - <ulink url="http://example.com/?foo=1&bar=2">http://example.com/?foo=1&bar=2</ulink> + <ulink url="http://example.com/?foo=1&bar=2">http://example.com/?foo=1&bar=2</ulink> </para> <itemizedlist> <listitem> @@ -916,10 +916,10 @@ Cat & 1 \\ \hline </blockquote> <para> Auto-links should not occur here: - <literal><http://example.com/></literal> + <literal><http://example.com/></literal> </para> <screen> -or here: <http://example.com/> +or here: <http://example.com/> </screen> </section> </section> @@ -970,7 +970,7 @@ or here: <http://example.com/> footnote (as with list items). </para> <screen> - { <code> } + { <code> } </screen> <para> If you want, you can indent every line, but you can also be lazy diff --git a/tests/writer.html b/tests/writer.html index 3213bb9ce..356e4cb3e 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -557,11 +557,11 @@ Cat & 1 \\ \hline Here is some unicode: </p> <ul> - <li>I hat: Î</li> - <li>o umlaut: ö</li> - <li>section: §</li> - <li>set membership: ∈</li> - <li>copyright: ©</li> + <li>I hat: Î</li> + <li>o umlaut: ö</li> + <li>section: §</li> + <li>set membership: ∈</li> + <li>copyright: ©</li> </ul> <p> AT&T has an ampersand in their name. |