git.iko.soy/typeable/pandoc
on master help sign in
Added separate latex reader and native reader tests;

removed round-trip tests. git-svn-id: https://pandoc.googlecode.com/svn/trunk@986 788f1e2b-df1e-0410-8736-df70ead52e1b

commitf6043ef7bf103e2665c32347cff125b5df9098b5 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 1 Sep 2007, 20:54 (19 years ago) parent25bbe13
3 files changed+1214−10
tests/latex-reader.latex+830 tests/latex-reader.native+378 tests/runtests.pl+6−10
tests/latex-reader.latexnew file+830
@@ -0,0 +1,830 @@
1+\documentclass{article}
2+\usepackage[mathletters]{ucs}
3+\usepackage[utf8x]{inputenc}
4+\setlength{\parindent}{0pt}
5+\setlength{\parskip}{6pt plus 2pt minus 1pt}
6+
7+\newcommand{\textsubscript}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
8+\usepackage[breaklinks=true]{hyperref}
9+\usepackage[normalem]{ulem}
10+\usepackage{enumerate}
11+\usepackage{fancyvrb}
12+\usepackage{graphicx}
13+\usepackage{url}
14+
15+\setcounter{secnumdepth}{0}
16+\VerbatimFootnotes % allows verbatim text in footnotes
17+\title{Pandoc Test Suite}
18+\author{John MacFarlane\\Anonymous}
19+\date{July 17, 2006}
20+\begin{document}
21+\maketitle
22+
23+This is a set of tests for pandoc. Most of them are adapted from
24+John Gruber's markdown test suite.
25+
26+\begin{center}\rule{3in}{0.4pt}\end{center}
27+
28+\section{Headers}
29+
30+\subsection{Level 2 with an \href{/url}{embedded link}}
31+
32+\subsubsection{Level 3 with \emph{emphasis}}
33+
34+Level 4
35+
36+Level 5
37+
38+\section{Level 1}
39+
40+\subsection{Level 2 with \emph{emphasis}}
41+
42+\subsubsection{Level 3}
43+
44+with no blank line
45+
46+\subsection{Level 2}
47+
48+with no blank line
49+
50+\begin{center}\rule{3in}{0.4pt}\end{center}
51+
52+\section{Paragraphs}
53+
54+Here's a regular paragraph.
55+
56+In Markdown 1.0.0 and earlier. Version 8. This line turns into a
57+list item. Because a hard-wrapped line in the middle of a paragraph
58+looked like a list item.
59+
60+Here's one with a bullet. * criminey.
61+
62+There should be a hard line break\\here.
63+
64+\begin{center}\rule{3in}{0.4pt}\end{center}
65+
66+\section{Block Quotes}
67+
68+E-mail style:
69+
70+\begin{quote}
71+This is a block quote. It is pretty short.
72+
73+\end{quote}
74+\begin{quote}
75+Code in a block quote:
76+
77+\begin{verbatim}
78+sub status {
79+ print "working";
80+}
81+\end{verbatim}
82+A list:
83+
84+\begin{enumerate}[1.]
85+\item
86+ item one
87+\item
88+ item two
89+\end{enumerate}
90+Nested block quotes:
91+
92+\begin{quote}
93+nested
94+
95+\end{quote}
96+\begin{quote}
97+nested
98+
99+\end{quote}
100+\end{quote}
101+This should not be a block quote: 2 \textgreater{} 1.
102+
103+Box-style:
104+
105+\begin{quote}
106+Example:
107+
108+\begin{verbatim}
109+sub status {
110+ print "working";
111+}
112+\end{verbatim}
113+\end{quote}
114+\begin{quote}
115+\begin{enumerate}[1.]
116+\item
117+ do laundry
118+\item
119+ take out the trash
120+\end{enumerate}
121+\end{quote}
122+Here's a nested one:
123+
124+\begin{quote}
125+Joe said:
126+
127+\begin{quote}
128+Don't quote me.
129+
130+\end{quote}
131+\end{quote}
132+And a following paragraph.
133+
134+\begin{center}\rule{3in}{0.4pt}\end{center}
135+
136+\section{Code Blocks}
137+
138+Code:
139+
140+\begin{verbatim}
141+---- (should be four hyphens)
142+
143+sub status {
144+ print "working";
145+}
146+
147+this code block is indented by one tab
148+\end{verbatim}
149+And:
150+
151+\begin{verbatim}
152+ this code block is indented by two tabs
153+
154+These should not be escaped: \$ \\ \> \[ \{
155+\end{verbatim}
156+\begin{center}\rule{3in}{0.4pt}\end{center}
157+
158+\section{Lists}
159+
160+\subsection{Unordered}
161+
162+Asterisks tight:
163+
164+\begin{itemize}
165+\item
166+ asterisk 1
167+\item
168+ asterisk 2
169+\item
170+ asterisk 3
171+\end{itemize}
172+Asterisks loose:
173+
174+\begin{itemize}
175+\item
176+ asterisk 1
177+
178+\item
179+ asterisk 2
180+
181+\item
182+ asterisk 3
183+
184+\end{itemize}
185+Pluses tight:
186+
187+\begin{itemize}
188+\item
189+ Plus 1
190+\item
191+ Plus 2
192+\item
193+ Plus 3
194+\end{itemize}
195+Pluses loose:
196+
197+\begin{itemize}
198+\item
199+ Plus 1
200+
201+\item
202+ Plus 2
203+
204+\item
205+ Plus 3
206+
207+\end{itemize}
208+Minuses tight:
209+
210+\begin{itemize}
211+\item
212+ Minus 1
213+\item
214+ Minus 2
215+\item
216+ Minus 3
217+\end{itemize}
218+Minuses loose:
219+
220+\begin{itemize}
221+\item
222+ Minus 1
223+
224+\item
225+ Minus 2
226+
227+\item
228+ Minus 3
229+
230+\end{itemize}
231+\subsection{Ordered}
232+
233+Tight:
234+
235+\begin{enumerate}[1.]
236+\item
237+ First
238+\item
239+ Second
240+\item
241+ Third
242+\end{enumerate}
243+and:
244+
245+\begin{enumerate}[1.]
246+\item
247+ One
248+\item
249+ Two
250+\item
251+ Three
252+\end{enumerate}
253+Loose using tabs:
254+
255+\begin{enumerate}[1.]
256+\item
257+ First
258+
259+\item
260+ Second
261+
262+\item
263+ Third
264+
265+\end{enumerate}
266+and using spaces:
267+
268+\begin{enumerate}[1.]
269+\item
270+ One
271+
272+\item
273+ Two
274+
275+\item
276+ Three
277+
278+\end{enumerate}
279+Multiple paragraphs:
280+
281+\begin{enumerate}[1.]
282+\item
283+ Item 1, graf one.
284+
285+ Item 1. graf two. The quick brown fox jumped over the lazy dog's
286+ back.
287+
288+\item
289+ Item 2.
290+
291+\item
292+ Item 3.
293+
294+\end{enumerate}
295+\subsection{Nested}
296+
297+\begin{itemize}
298+\item
299+ Tab
300+ \begin{itemize}
301+ \item
302+ Tab
303+ \begin{itemize}
304+ \item
305+ Tab
306+ \end{itemize}
307+ \end{itemize}
308+\end{itemize}
309+Here's another:
310+
311+\begin{enumerate}[1.]
312+\item
313+ First
314+\item
315+ Second:
316+ \begin{itemize}
317+ \item
318+ Fee
319+ \item
320+ Fie
321+ \item
322+ Foe
323+ \end{itemize}
324+\item
325+ Third
326+\end{enumerate}
327+Same thing but with paragraphs:
328+
329+\begin{enumerate}[1.]
330+\item
331+ First
332+
333+\item
334+ Second:
335+
336+ \begin{itemize}
337+ \item
338+ Fee
339+ \item
340+ Fie
341+ \item
342+ Foe
343+ \end{itemize}
344+\item
345+ Third
346+
347+\end{enumerate}
348+\subsection{Tabs and spaces}
349+
350+\begin{itemize}
351+\item
352+ this is a list item indented with tabs
353+
354+\item
355+ this is a list item indented with spaces
356+
357+ \begin{itemize}
358+ \item
359+ this is an example list item indented with tabs
360+
361+ \item
362+ this is an example list item indented with spaces
363+
364+ \end{itemize}
365+\end{itemize}
366+\subsection{Fancy list markers}
367+
368+\begin{enumerate}[(1)]
369+\setcounter{enumi}{1}
370+\item
371+ begins with 2
372+\item
373+ and now 3
374+
375+ with a continuation
376+
377+ \begin{enumerate}[i.]
378+ \setcounter{enumii}{3}
379+ \item
380+ sublist with roman numerals, starting with 4
381+ \item
382+ more items
383+ \begin{enumerate}[(A)]
384+ \item
385+ a subsublist
386+ \item
387+ a subsublist
388+ \end{enumerate}
389+ \end{enumerate}
390+\end{enumerate}
391+Nesting:
392+
393+\begin{enumerate}[A.]
394+\item
395+ Upper Alpha
396+ \begin{enumerate}[I.]
397+ \item
398+ Upper Roman.
399+ \begin{enumerate}[(1)]
400+ \setcounter{enumiii}{5}
401+ \item
402+ Decimal start with 6
403+ \begin{enumerate}[a)]
404+ \setcounter{enumiv}{2}
405+ \item
406+ Lower alpha with paren
407+ \end{enumerate}
408+ \end{enumerate}
409+ \end{enumerate}
410+\end{enumerate}
411+Autonumbering:
412+
413+\begin{enumerate}
414+\item
415+ Autonumber.
416+\item
417+ More.
418+ \begin{enumerate}
419+ \item
420+ Nested.
421+ \end{enumerate}
422+\end{enumerate}
423+Should not be a list item:
424+
425+M.A. 2007
426+
427+B. Williams
428+
429+\begin{center}\rule{3in}{0.4pt}\end{center}
430+
431+\section{Definition Lists}
432+
433+Tight using spaces:
434+
435+\begin{description}
436+\item[apple]
437+red fruit
438+\item[orange]
439+orange fruit
440+\item[banana]
441+yellow fruit
442+\end{description}
443+Tight using tabs:
444+
445+\begin{description}
446+\item[apple]
447+red fruit
448+\item[orange]
449+orange fruit
450+\item[banana]
451+yellow fruit
452+\end{description}
453+Loose:
454+
455+\begin{description}
456+\item[apple]
457+red fruit
458+
459+\item[orange]
460+orange fruit
461+
462+\item[banana]
463+yellow fruit
464+
465+\end{description}
466+Multiple blocks with italics:
467+
468+\begin{description}
469+\item[\emph{apple}]
470+red fruit
471+
472+contains seeds, crisp, pleasant to taste
473+
474+\item[\emph{orange}]
475+orange fruit
476+
477+\begin{verbatim}
478+{ orange code block }
479+\end{verbatim}
480+\begin{quote}
481+orange block quote
482+
483+\end{quote}
484+\end{description}
485+\section{HTML Blocks}
486+
487+Simple block on one line:
488+
489+foo
490+And nested without indentation:
491+
492+foo
493+bar
494+Interpreted markdown in a table:
495+
496+This is \emph{emphasized}
497+And this is \textbf{strong}
498+Here's a simple block:
499+
500+foo
501+This should be a code block, though:
502+
503+\begin{verbatim}
504+<div>
505+ foo
506+</div>
507+\end{verbatim}
508+As should this:
509+
510+\begin{verbatim}
511+<div>foo</div>
512+\end{verbatim}
513+Now, nested:
514+
515+foo
516+This should just be an HTML comment:
517+
518+Multiline:
519+
520+Code block:
521+
522+\begin{verbatim}
523+<!-- Comment -->
524+\end{verbatim}
525+Just plain comment, with trailing spaces on the line:
526+
527+Code:
528+
529+\begin{verbatim}
530+<hr />
531+\end{verbatim}
532+Hr's:
533+
534+\begin{center}\rule{3in}{0.4pt}\end{center}
535+
536+\section{Inline Markup}
537+
538+This is \emph{emphasized}, and so \emph{is this}.
539+
540+This is \textbf{strong}, and so \textbf{is this}.
541+
542+An \emph{\href{/url}{emphasized link}}.
543+
544+\textbf{\emph{This is strong and em.}}
545+
546+So is \textbf{\emph{this}} word.
547+
548+\textbf{\emph{This is strong and em.}}
549+
550+So is \textbf{\emph{this}} word.
551+
552+This is code: \verb!>!, \verb!$!, \verb!\!, \verb!\$!,
553+\verb!<html>!.
554+
555+\sout{This is \emph{strikeout}.}
556+
557+Superscripts: a\textsuperscript{bc}d
558+a\textsuperscript{\emph{hello}} a\textsuperscript{hello there}.
559+
560+Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
561+H\textsubscript{many of them}O.
562+
563+These should not be superscripts or subscripts, because of the
564+unescaped spaces: a\^{}b c\^{}d, a\ensuremath{\sim}b
565+c\ensuremath{\sim}d.
566+
567+\begin{center}\rule{3in}{0.4pt}\end{center}
568+
569+\section{Smart quotes, ellipses, dashes}
570+
571+``Hello,'' said the spider. ``\,`Shelob' is my name.''
572+
573+`A', `B', and `C' are letters.
574+
575+`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
576+
577+`He said, ``I want to go.''\,' Were you alive in the 70's?
578+
579+Here is some quoted `\verb!code!' and a
580+``\href{http://example.com/?foo=1&bar=2}{quoted link}''.
581+
582+Some dashes: one---two---three---four---five.
583+
584+Dashes between numbers: 5--7, 255--66, 1987--1999.
585+
586+Ellipses\ldots{}and\ldots{}and\ldots{}.
587+
588+\begin{center}\rule{3in}{0.4pt}\end{center}
589+
590+\section{LaTeX}
591+
592+\begin{itemize}
593+\item
594+ \cite[22-23]{smith.1899}
595+\item
596+ \doublespacing
597+\item
598+ $2+2=4$
599+\item
600+ $x \in y$
601+\item
602+ $\alpha \wedge \omega$
603+\item
604+ $223$
605+\item
606+ $p$-Tree
607+\item
608+ $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
609+\item
610+ Here's one that has a line break in it:
611+ $\alpha + \omega \times x^2$.
612+\end{itemize}
613+These shouldn't be math:
614+
615+\begin{itemize}
616+\item
617+ To get the famous equation, write \verb!$e = mc^2$!.
618+\item
619+ \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if
620+ ``lot'' is emphasized.)
621+\item
622+ Escaped \verb!$!: \$73 \emph{this should be emphasized} 23\$.
623+\end{itemize}
624+Here's a LaTeX table:
625+
626+\begin{tabular}{|l|l|}\hline
627+Animal & Number \\ \hline
628+Dog & 2 \\
629+Cat & 1 \\ \hline
630+\end{tabular}
631+
632+\begin{center}\rule{3in}{0.4pt}\end{center}
633+
634+\section{Special Characters}
635+
636+Here is some unicode:
637+
638+\begin{itemize}
639+\item
640+ I hat: Î
641+\item
642+ o umlaut: ö
643+\item
644+ section: §
645+\item
646+ set membership: ∈
647+\item
648+ copyright: ©
649+\end{itemize}
650+AT\&T has an ampersand in their name.
651+
652+AT\&T is another way to write it.
653+
654+This \& that.
655+
656+4 \textless{} 5.
657+
658+6 \textgreater{} 5.
659+
660+Backslash: \textbackslash{}
661+
662+Backtick: `
663+
664+Asterisk: *
665+
666+Underscore: \_
667+
668+Left brace: \{
669+
670+Right brace: \}
671+
672+Left bracket: [
673+
674+Right bracket: ]
675+
676+Left paren: (
677+
678+Right paren: )
679+
680+Greater-than: \textgreater{}
681+
682+Hash: \#
683+
684+Period: .
685+
686+Bang: !
687+
688+Plus: +
689+
690+Minus: -
691+
692+\begin{center}\rule{3in}{0.4pt}\end{center}
693+
694+\section{Links}
695+
696+\subsection{Explicit}
697+
698+Just a \href{/url/}{URL}.
699+
700+\href{/url/}{URL and title}.
701+
702+\href{/url/}{URL and title}.
703+
704+\href{/url/}{URL and title}.
705+
706+\href{/url/}{URL and title}
707+
708+\href{/url/}{URL and title}
709+
710+\href{/url/with_underscore}{with\_underscore}
711+
712+\href{mailto:nobody@nowhere.net}{Email link}
713+
714+\href{}{Empty}.
715+
716+\subsection{Reference}
717+
718+Foo \href{/url/}{bar}.
719+
720+Foo \href{/url/}{bar}.
721+
722+Foo \href{/url/}{bar}.
723+
724+With \href{/url/}{embedded [brackets]}.
725+
726+\href{/url/}{b} by itself should be a link.
727+
728+Indented \href{/url}{once}.
729+
730+Indented \href{/url}{twice}.
731+
732+Indented \href{/url}{thrice}.
733+
734+This should [not][] be a link.
735+
736+\begin{verbatim}
737+[not]: /url
738+\end{verbatim}
739+Foo \href{/url/}{bar}.
740+
741+Foo \href{/url/}{biz}.
742+
743+\subsection{With ampersands}
744+
745+Here's a
746+\href{http://example.com/?foo=1&bar=2}{link with an ampersand in the URL}.
747+
748+Here's a link with an amersand in the link text:
749+\href{http://att.com/}{AT\&T}.
750+
751+Here's an \href{/script?foo=1&bar=2}{inline link}.
752+
753+Here's an
754+\href{/script?foo=1&bar=2}{inline link in pointy braces}.
755+
756+\subsection{Autolinks}
757+
758+With an ampersand: \url{http://example.com/?foo=1&bar=2}
759+
760+\begin{itemize}
761+\item
762+ In a list?
763+\item
764+ \url{http://example.com/}
765+\item
766+ It should.
767+\end{itemize}
768+An e-mail address:
769+\href{mailto:nobody@nowhere.net}{\texttt{nobody@nowhere.net}}
770+
771+\begin{quote}
772+Blockquoted: \url{http://example.com/}
773+
774+\end{quote}
775+Auto-links should not occur here: \verb!<http://example.com/>!
776+
777+\begin{verbatim}
778+or here: <http://example.com/>
779+\end{verbatim}
780+\begin{center}\rule{3in}{0.4pt}\end{center}
781+
782+\section{Images}
783+
784+From ``Voyage dans la Lune'' by Georges Melies (1902):
785+
786+\includegraphics{lalune.jpg}
787+
788+Here is a movie \includegraphics{movie.jpg} icon.
789+
790+\begin{center}\rule{3in}{0.4pt}\end{center}
791+
792+\section{Footnotes}
793+
794+Here is a footnote
795+reference,\footnote{ Here is the footnote. It can go anywhere after the footnote
796+reference. It need not be placed at the end of the document.
797+}
798+and
799+another.\footnote{ Here's the long note. This one contains multiple blocks.
800+
801+Subsequent blocks are indented to show that they belong to the
802+footnote (as with list items).
803+
804+\begin{Verbatim}
805+ { <code> }
806+\end{Verbatim}
807+If you want, you can indent every line, but you can also be lazy
808+and just indent the first line of each block.
809+}
810+This should \emph{not} be a footnote reference, because it contains
811+a space.[\^{}my note] Here is an inline
812+note.\footnote{ This is \emph{easier} to type. Inline notes may contain
813+\href{http://google.com}{links} and \verb!]! verbatim characters,
814+as well as [bracketed text].
815+}
816+
817+\begin{quote}
818+Notes can go in quotes.\footnote{ In quote.
819+}
820+
821+\end{quote}
822+\begin{enumerate}[1.]
823+\item
824+ And in list items.\footnote{ In list.
825+}
826+\end{enumerate}
827+This paragraph should not be part of the note, as it is not
828+indented.
829+
830+\end{document}
tests/latex-reader.nativenew file+378
@@ -0,0 +1,378 @@
1+Pandoc (Meta [Str "Pandoc",Space,Str "Test",Space,Str "Suite"] ["John MacFarlane","Anonymous"] "July 17, 2006")
2+[ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber",Apostrophe,Str "s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
3+, HorizontalRule
4+, Header 1 [Str "Headers"]
5+, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link [Str "embedded",Space,Str "link"] ("/url","")]
6+, Header 3 [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
7+, Para [Str "Level",Space,Str "4"]
8+, Para [Str "Level",Space,Str "5"]
9+, Header 1 [Str "Level",Space,Str "1"]
10+, Header 2 [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
11+, Header 3 [Str "Level",Space,Str "3"]
12+, Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
13+, Header 2 [Str "Level",Space,Str "2"]
14+, Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
15+, HorizontalRule
16+, Header 1 [Str "Paragraphs"]
17+, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
18+, Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard",Str "-",Str "wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
19+, Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
20+, Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
21+, HorizontalRule
22+, Header 1 [Str "Block",Space,Str "Quotes"]
23+, Para [Str "E",Str "-",Str "mail",Space,Str "style:"]
24+, BlockQuote
25+ [ Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."] ]
26+
27+, BlockQuote
28+ [ Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
29+ , CodeBlock "sub status {\n print \"working\";\n}"
30+ , Para [Str "A",Space,Str "list:"]
31+ , OrderedList (1,Decimal,Period)
32+ [ [ Para [Str "item",Space,Str "one"] ]
33+ , [ Para [Str "item",Space,Str "two"] ] ]
34+ , Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
35+ , BlockQuote
36+ [ Para [Str "nested"] ]
37+
38+ , BlockQuote
39+ [ Para [Str "nested"] ]
40+ ]
41+, Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."]
42+, Para [Str "Box",Str "-",Str "style:"]
43+, BlockQuote
44+ [ Para [Str "Example:"]
45+ , CodeBlock "sub status {\n print \"working\";\n}" ]
46+, BlockQuote
47+ [ OrderedList (1,Decimal,Period)
48+ [ [ Para [Str "do",Space,Str "laundry"] ]
49+ , [ Para [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"] ] ] ]
50+, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
51+, BlockQuote
52+ [ Para [Str "Joe",Space,Str "said:"]
53+ , BlockQuote
54+ [ Para [Str "Don",Apostrophe,Str "t",Space,Str "quote",Space,Str "me."] ]
55+ ]
56+, Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
57+, HorizontalRule
58+, Header 1 [Str "Code",Space,Str "Blocks"]
59+, Para [Str "Code:"]
60+, CodeBlock "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
61+, Para [Str "And:"]
62+, CodeBlock " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
63+, HorizontalRule
64+, Header 1 [Str "Lists"]
65+, Header 2 [Str "Unordered"]
66+, Para [Str "Asterisks",Space,Str "tight:"]
67+, BulletList
68+ [ [ Para [Str "asterisk",Space,Str "1"] ]
69+ , [ Para [Str "asterisk",Space,Str "2"] ]
70+ , [ Para [Str "asterisk",Space,Str "3"] ] ]
71+, Para [Str "Asterisks",Space,Str "loose:"]
72+, BulletList
73+ [ [ Para [Str "asterisk",Space,Str "1"] ]
74+ , [ Para [Str "asterisk",Space,Str "2"] ]
75+ , [ Para [Str "asterisk",Space,Str "3"] ] ]
76+, Para [Str "Pluses",Space,Str "tight:"]
77+, BulletList
78+ [ [ Para [Str "Plus",Space,Str "1"] ]
79+ , [ Para [Str "Plus",Space,Str "2"] ]
80+ , [ Para [Str "Plus",Space,Str "3"] ] ]
81+, Para [Str "Pluses",Space,Str "loose:"]
82+, BulletList
83+ [ [ Para [Str "Plus",Space,Str "1"] ]
84+ , [ Para [Str "Plus",Space,Str "2"] ]
85+ , [ Para [Str "Plus",Space,Str "3"] ] ]
86+, Para [Str "Minuses",Space,Str "tight:"]
87+, BulletList
88+ [ [ Para [Str "Minus",Space,Str "1"] ]
89+ , [ Para [Str "Minus",Space,Str "2"] ]
90+ , [ Para [Str "Minus",Space,Str "3"] ] ]
91+, Para [Str "Minuses",Space,Str "loose:"]
92+, BulletList
93+ [ [ Para [Str "Minus",Space,Str "1"] ]
94+ , [ Para [Str "Minus",Space,Str "2"] ]
95+ , [ Para [Str "Minus",Space,Str "3"] ] ]
96+, Header 2 [Str "Ordered"]
97+, Para [Str "Tight:"]
98+, OrderedList (1,Decimal,Period)
99+ [ [ Para [Str "First"] ]
100+ , [ Para [Str "Second"] ]
101+ , [ Para [Str "Third"] ] ]
102+, Para [Str "and:"]
103+, OrderedList (1,Decimal,Period)
104+ [ [ Para [Str "One"] ]
105+ , [ Para [Str "Two"] ]
106+ , [ Para [Str "Three"] ] ]
107+, Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
108+, OrderedList (1,Decimal,Period)
109+ [ [ Para [Str "First"] ]
110+ , [ Para [Str "Second"] ]
111+ , [ Para [Str "Third"] ] ]
112+, Para [Str "and",Space,Str "using",Space,Str "spaces:"]
113+, OrderedList (1,Decimal,Period)
114+ [ [ Para [Str "One"] ]
115+ , [ Para [Str "Two"] ]
116+ , [ Para [Str "Three"] ] ]
117+, Para [Str "Multiple",Space,Str "paragraphs:"]
118+, OrderedList (1,Decimal,Period)
119+ [ [ Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
120+ , Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog",Apostrophe,Str "s",Space,Str "back."] ], [ Para [Str "Item",Space,Str "2."] ]
121+ , [ Para [Str "Item",Space,Str "3."] ] ]
122+, Header 2 [Str "Nested"]
123+, BulletList
124+ [ [ Para [Str "Tab"]
125+ , BulletList
126+ [ [ Para [Str "Tab"]
127+ , BulletList
128+ [ [ Para [Str "Tab"] ]
129+ ] ] ] ] ]
130+, Para [Str "Here",Apostrophe,Str "s",Space,Str "another:"]
131+, OrderedList (1,Decimal,Period)
132+ [ [ Para [Str "First"] ]
133+ , [ Para [Str "Second:"]
134+ , BulletList
135+ [ [ Para [Str "Fee"] ]
136+ , [ Para [Str "Fie"] ]
137+ , [ Para [Str "Foe"] ] ] ], [ Para [Str "Third"] ] ]
138+, Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
139+, OrderedList (1,Decimal,Period)
140+ [ [ Para [Str "First"] ]
141+ , [ Para [Str "Second:"]
142+ , BulletList
143+ [ [ Para [Str "Fee"] ]
144+ , [ Para [Str "Fie"] ]
145+ , [ Para [Str "Foe"] ] ] ], [ Para [Str "Third"] ] ]
146+, Header 2 [Str "Tabs",Space,Str "and",Space,Str "spaces"]
147+, BulletList
148+ [ [ Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"] ]
149+ , [ Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
150+ , BulletList
151+ [ [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"] ]
152+ , [ Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"] ] ] ] ]
153+, Header 2 [Str "Fancy",Space,Str "list",Space,Str "markers"]
154+, OrderedList (2,Decimal,TwoParens)
155+ [ [ Para [Str "begins",Space,Str "with",Space,Str "2"] ]
156+ , [ Para [Str "and",Space,Str "now",Space,Str "3"]
157+ , Para [Str "with",Space,Str "a",Space,Str "continuation"]
158+ , OrderedList (4,LowerRoman,Period)
159+ [ [ Para [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"] ]
160+ , [ Para [Str "more",Space,Str "items"]
161+ , OrderedList (1,UpperAlpha,TwoParens)
162+ [ [ Para [Str "a",Space,Str "subsublist"] ]
163+ , [ Para [Str "a",Space,Str "subsublist"] ] ] ] ] ] ]
164+, Para [Str "Nesting:"]
165+, OrderedList (1,UpperAlpha,Period)
166+ [ [ Para [Str "Upper",Space,Str "Alpha"]
167+ , OrderedList (1,UpperRoman,Period)
168+ [ [ Para [Str "Upper",Space,Str "Roman."]
169+ , OrderedList (6,Decimal,TwoParens)
170+ [ [ Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
171+ , OrderedList (3,LowerAlpha,OneParen)
172+ [ [ Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"] ]
173+ ] ] ] ] ] ] ]
174+, Para [Str "Autonumbering:"]
175+, OrderedList (1,DefaultStyle,DefaultDelim)
176+ [ [ Para [Str "Autonumber."] ]
177+ , [ Para [Str "More."]
178+ , OrderedList (1,DefaultStyle,DefaultDelim)
179+ [ [ Para [Str "Nested."] ]
180+ ] ] ]
181+, Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"]
182+, Para [Str "M.A.",Space,Str "2007"]
183+, Para [Str "B.",Space,Str "Williams"]
184+, HorizontalRule
185+, Header 1 [Str "Definition",Space,Str "Lists"]
186+, Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
187+, DefinitionList
188+ [ ([Str "apple"],
189+ [ Para [Str "red",Space,Str "fruit"] ]
190+ ),
191+ ([Str "orange"],
192+ [ Para [Str "orange",Space,Str "fruit"] ]
193+ ),
194+ ([Str "banana"],
195+ [ Para [Str "yellow",Space,Str "fruit"] ]
196+ ) ]
197+, Para [Str "Tight",Space,Str "using",Space,Str "tabs:"]
198+, DefinitionList
199+ [ ([Str "apple"],
200+ [ Para [Str "red",Space,Str "fruit"] ]
201+ ),
202+ ([Str "orange"],
203+ [ Para [Str "orange",Space,Str "fruit"] ]
204+ ),
205+ ([Str "banana"],
206+ [ Para [Str "yellow",Space,Str "fruit"] ]
207+ ) ]
208+, Para [Str "Loose:"]
209+, DefinitionList
210+ [ ([Str "apple"],
211+ [ Para [Str "red",Space,Str "fruit"] ]
212+ ),
213+ ([Str "orange"],
214+ [ Para [Str "orange",Space,Str "fruit"] ]
215+ ),
216+ ([Str "banana"],
217+ [ Para [Str "yellow",Space,Str "fruit"] ]
218+ ) ]
219+, Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
220+, DefinitionList
221+ [ ([Emph [Str "apple"]],
222+ [ Para [Str "red",Space,Str "fruit"]
223+ , Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"] ] ),
224+ ([Emph [Str "orange"]],
225+ [ Para [Str "orange",Space,Str "fruit"]
226+ , CodeBlock "{ orange code block }"
227+ , BlockQuote
228+ [ Para [Str "orange",Space,Str "block",Space,Str "quote"] ]
229+ ] ) ]
230+, Header 1 [Str "HTML",Space,Str "Blocks"]
231+, Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
232+, Para [Str "foo",Space,Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]
233+, Para [Str "foo",Space,Str "bar",Space,Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]
234+, Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Space,Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"],Space,Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "simple",Space,Str "block:"]
235+, Para [Str "foo",Space,Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"]
236+, CodeBlock "<div>\n foo\n</div>"
237+, Para [Str "As",Space,Str "should",Space,Str "this:"]
238+, CodeBlock "<div>foo</div>"
239+, Para [Str "Now,",Space,Str "nested:"]
240+, Para [Str "foo",Space,Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"]
241+, Para [Str "Multiline:"]
242+, Para [Str "Code",Space,Str "block:"]
243+, CodeBlock "<!-- Comment -->"
244+, Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"]
245+, Para [Str "Code:"]
246+, CodeBlock "<hr />"
247+, Para [Str "Hr",Apostrophe,Str "s:"]
248+, HorizontalRule
249+, Header 1 [Str "Inline",Space,Str "Markup"]
250+, Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
251+, Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
252+, Para [Str "An",Space,Emph [Link [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
253+, Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
254+, Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
255+, Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
256+, Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
257+, Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ">",Str ",",Space,Code "$",Str ",",Space,Code "\\",Str ",",Space,Code "\\$",Str ",",Space,Code "<html>",Str "."]
258+, Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
259+, Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str "."]
260+, Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
261+, Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a",Str "^",Str "b",Space,Str "c",Str "^",Str "d,",Space,Str "a",Str "~",Str "b",Space,Str "c",Str "~",Str "d."]
262+, HorizontalRule
263+, Header 1 [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
264+, Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]]
265+, Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
266+, Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]]
267+, Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70",Apostrophe,Str "s?"]
268+, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
269+, Para [Str "Some",Space,Str "dashes:",Space,Str "one",EmDash,Str "two",EmDash,Str "three",EmDash,Str "four",EmDash,Str "five."]
270+, Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5",EnDash,Str "7,",Space,Str "255",EnDash,Str "66,",Space,Str "1987",EnDash,Str "1999."]
271+, Para [Str "Ellipses",Ellipses,Str "and",Ellipses,Str "and",Ellipses,Str "."]
272+, HorizontalRule
273+, Header 1 [Str "LaTeX"]
274+, BulletList
275+ [ [ Para [TeX "\\cite[22-23]{smith.1899}"] ]
276+ , [ Para [TeX "\\doublespacing"] ]
277+ , [ Para [TeX "$2+2=4$"] ]
278+ , [ Para [TeX "$x \\in y$"] ]
279+ , [ Para [TeX "$\\alpha \\wedge \\omega$"] ]
280+ , [ Para [TeX "$223$"] ]
281+ , [ Para [TeX "$p$",Str "-",Str "Tree"] ]
282+ , [ Para [TeX "$\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}$"] ]
283+ , [ Para [Str "Here",Apostrophe,Str "s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,TeX "$\\alpha + \\omega \\times x^2$",Str "."] ] ]
284+, Para [Str "These",Space,Str "shouldn",Apostrophe,Str "t",Space,Str "be",Space,Str "math:"]
285+, BulletList
286+ [ [ Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code "$e = mc^2$",Str "."] ]
287+ , [ Para [Str "$",Str "22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$",Str "34,000.",Space,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"] ]
288+ , [ Para [Str "Escaped",Space,Code "$",Str ":",Space,Str "$",Str "73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23",Str "$",Str "."] ] ]
289+, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
290+, Para [TeX "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"]
291+, HorizontalRule
292+, Header 1 [Str "Special",Space,Str "Characters"]
293+, Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
294+, BulletList
295+ [ [ Para [Str "I",Space,Str "hat:",Space,Str "\206"] ]
296+ , [ Para [Str "o",Space,Str "umlaut:",Space,Str "\246"] ]
297+ , [ Para [Str "section:",Space,Str "\167"] ]
298+ , [ Para [Str "set",Space,Str "membership:",Space,Str "\8712"] ]
299+ , [ Para [Str "copyright:",Space,Str "\169"] ] ]
300+, Para [Str "AT",Str "&",Str "T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
301+, Para [Str "AT",Str "&",Str "T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
302+, Para [Str "This",Space,Str "&",Space,Str "that."]
303+, Para [Str "4",Space,Str "<",Space,Str "5."]
304+, Para [Str "6",Space,Str ">",Space,Str "5."]
305+, Para [Str "Backslash:",Space,Str "\\"]
306+, Para [Str "Backtick:"]
307+, Para [Str "Asterisk:",Space,Str "*"]
308+, Para [Str "Underscore:",Space,Str "_"]
309+, Para [Str "Left",Space,Str "brace:",Space,Str "{"]
310+, Para [Str "Right",Space,Str "brace:",Space,Str "}"]
311+, Para [Str "Left",Space,Str "bracket:",Space,Str "["]
312+, Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
313+, Para [Str "Left",Space,Str "paren:",Space,Str "("]
314+, Para [Str "Right",Space,Str "paren:",Space,Str ")"]
315+, Para [Str "Greater",Str "-",Str "than:",Space,Str ">"]
316+, Para [Str "Hash:",Space,Str "#"]
317+, Para [Str "Period:",Space,Str "."]
318+, Para [Str "Bang:",Space,Str "!"]
319+, Para [Str "Plus:",Space,Str "+"]
320+, Para [Str "Minus:",Space,Str "-"]
321+, HorizontalRule
322+, Header 1 [Str "Links"]
323+, Header 2 [Str "Explicit"]
324+, Para [Str "Just",Space,Str "a",Space,Link [Str "URL"] ("/url/",""),Str "."]
325+, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
326+, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
327+, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
328+, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
329+, Para [Link [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
330+, Para [Link [Str "with",Str "_",Str "underscore"] ("/url/with_underscore","")]
331+, Para [Link [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
332+, Para [Link [Str "Empty"] ("",""),Str "."]
333+, Header 2 [Str "Reference"]
334+, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
335+, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
336+, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
337+, Para [Str "With",Space,Link [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
338+, Para [Link [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
339+, Para [Str "Indented",Space,Link [Str "once"] ("/url",""),Str "."]
340+, Para [Str "Indented",Space,Link [Str "twice"] ("/url",""),Str "."]
341+, Para [Str "Indented",Space,Link [Str "thrice"] ("/url",""),Str "."]
342+, Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."]
343+, CodeBlock "[not]: /url"
344+, Para [Str "Foo",Space,Link [Str "bar"] ("/url/",""),Str "."]
345+, Para [Str "Foo",Space,Link [Str "biz"] ("/url/",""),Str "."]
346+, Header 2 [Str "With",Space,Str "ampersands"]
347+, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Link [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
348+, Para [Str "Here",Apostrophe,Str "s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link [Str "AT",Str "&",Str "T"] ("http://att.com/",""),Str "."]
349+, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
350+, Para [Str "Here",Apostrophe,Str "s",Space,Str "an",Space,Link [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
351+, Header 2 [Str "Autolinks"]
352+, Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link [Code "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
353+, BulletList
354+ [ [ Para [Str "In",Space,Str "a",Space,Str "list?"] ]
355+ , [ Para [Link [Code "http://example.com/"] ("http://example.com/","")] ]
356+ , [ Para [Str "It",Space,Str "should."] ] ]
357+, Para [Str "An",Space,Str "e",Str "-",Str "mail",Space,Str "address:",Space,Link [Code "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
358+, BlockQuote
359+ [ Para [Str "Blockquoted:",Space,Link [Code "http://example.com/"] ("http://example.com/","")] ]
360+
361+, Para [Str "Auto",Str "-",Str "links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code "<http://example.com/>"]
362+, CodeBlock "or here: <http://example.com/>"
363+, HorizontalRule
364+, Header 1 [Str "Images"]
365+, Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
366+, Para [Image [Str "image"] ("lalune.jpg","")]
367+, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image [Str "image"] ("movie.jpg",""),Space,Str "icon."]
368+, HorizontalRule
369+, Header 1 [Str "Footnotes"]
370+, Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here",Apostrophe,Str "s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space.[",Str "^",Str "my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",Space,Link [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code "]",Space,Str "verbatim",Space,Str "characters,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]]
371+, BlockQuote
372+ [ Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]] ]
373+
374+, OrderedList (1,Decimal,Period)
375+ [ [ Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]] ]
376+ ]
377+, Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."] ]
378+
tests/runtests.pl+6−10
@@ -15,7 +15,6 @@ unless (-x $script) { die "$script is not executable.\n"; }
1515print "Writer tests:\n";
1616
1717my @writeformats = ("html", "latex", "rst", "rtf", "markdown", "man", "native"); # docbook, context, and s5 handled separately
18−my @readformats = ("latex", "native"); # handle html,markdown & rst separately
1918my $source = "testsuite.native";
2019
2120sub test_results
@@ -99,16 +98,13 @@ print "Testing html reader...";
9998`$script -r html -w native -s html-reader.html > tmp.native`;
10099test_results("html reader", "tmp.native", "html-reader.native");
101100
102−print "\nReader tests (roundtrip: X -> native -> X -> native):\n";
101+print "Testing latex reader...";
102+`$script -r latex -w native -s latex-reader.latex > tmp.native`;
103+test_results("latex reader", "tmp.native", "latex-reader.native");
103104
104−foreach my $format (@readformats)
105−{
106− print "Testing $format reader...";
107− `$script -r $format -w native -s -R writer.$format > tmp1.native`;
108− `$script -r native -w $format -s -R tmp1.native | $script -r $format -w native -s -R - > tmp2.native`;
109− test_results("$format reader", "tmp1.native", "tmp2.native");
110−}
105+print "Testing native reader...";
106+`$script -r native -w native -s testsuite.native > tmp.native`;
107+test_results("native reader", "tmp.native", "testsuite.native");
111108
112−`rm tmp?.*`;
113109`rm tmp.*`;
114110