git.iko.soy/typeable/pandoc
on master help sign in
Update tests suite to expect \texorpdfstring.
commit08d80809c20408701b2ccf57d561196e9743269e authorVaclav Zeman <vhaisman@gmail.com> dateThu 13 Feb 2014, 00:03 (13 years ago) parent64bcb9f
4 files changed+43−35
tests/Tests/Writers/LaTeX.hs+1−1 tests/lhs-test.latex+1−1 tests/lhs-test.latex+lhs+1−1 tests/writer.latex+40−32
tests/Tests/Writers/LaTeX.hs+1−1
@@ -52,6 +52,6 @@ tests = [ testGroup "code blocks"
5252 [ "unnumbered header" =:
5353 headerWith ("foo",["unnumbered"],[]) 1
5454 (text "Header 1" <> note (plain $ text "note")) =?>
55− "\\section*{Header 1\\footnote{note}}\\label{foo}\n\\addcontentsline{toc}{section}{Header 1}\n"
55+ "\\section*{\\texorpdfstring{Header 1\\footnote{note}}{Header 1}}\\label{foo}\n\\addcontentsline{toc}{section}{Header 1}\n"
5656 ]
5757 ]
tests/lhs-test.latex+1−1
@@ -68,7 +68,7 @@
6868
6969\begin{document}
7070
71−\section{lhs test}\label{lhs-test}
71+\section{\texorpdfstring{lhs test}{lhs test}}\label{lhs-test}
7272
7373\texttt{unsplit} is an arrow that takes a pair of values and combines them to
7474return a single value:
tests/lhs-test.latex+lhs+1−1
@@ -49,7 +49,7 @@
4949
5050\begin{document}
5151
52−\section{lhs test}\label{lhs-test}
52+\section{\texorpdfstring{lhs test}{lhs test}}\label{lhs-test}
5353
5454\texttt{unsplit} is an arrow that takes a pair of values and combines them to
5555return a single value:
tests/writer.latex+40−32
@@ -78,32 +78,34 @@ markdown test suite.
7878
7979\begin{center}\rule{3in}{0.4pt}\end{center}
8080
81−\section{Headers}\label{headers}
81+\section{\texorpdfstring{Headers}{Headers}}\label{headers}
8282
83−\subsection{Level 2 with an \href{/url}{embedded
84−link}}\label{level-2-with-an-embedded-link}
83+\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
84+link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}
8585
86−\subsubsection{Level 3 with \emph{emphasis}}\label{level-3-with-emphasis}
86+\subsubsection{\texorpdfstring{Level 3 with
87+\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}
8788
88−\paragraph{Level 4}\label{level-4}
89+\paragraph{\texorpdfstring{Level 4}{Level 4}}\label{level-4}
8990
90−\subparagraph{Level 5}\label{level-5}
91+\subparagraph{\texorpdfstring{Level 5}{Level 5}}\label{level-5}
9192
92−\section{Level 1}\label{level-1}
93+\section{\texorpdfstring{Level 1}{Level 1}}\label{level-1}
9394
94−\subsection{Level 2 with \emph{emphasis}}\label{level-2-with-emphasis}
95+\subsection{\texorpdfstring{Level 2 with
96+\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}
9597
96−\subsubsection{Level 3}\label{level-3}
98+\subsubsection{\texorpdfstring{Level 3}{Level 3}}\label{level-3}
9799
98100with no blank line
99101
100−\subsection{Level 2}\label{level-2}
102+\subsection{\texorpdfstring{Level 2}{Level 2}}\label{level-2}
101103
102104with no blank line
103105
104106\begin{center}\rule{3in}{0.4pt}\end{center}
105107
106−\section{Paragraphs}\label{paragraphs}
108+\section{\texorpdfstring{Paragraphs}{Paragraphs}}\label{paragraphs}
107109
108110Here's a regular paragraph.
109111
@@ -117,7 +119,7 @@ There should be a hard line break\\here.
117119
118120\begin{center}\rule{3in}{0.4pt}\end{center}
119121
120−\section{Block Quotes}\label{block-quotes}
122+\section{\texorpdfstring{Block Quotes}{Block Quotes}}\label{block-quotes}
121123
122124E-mail style:
123125
@@ -162,7 +164,7 @@ And a following paragraph.
162164
163165\begin{center}\rule{3in}{0.4pt}\end{center}
164166
165−\section{Code Blocks}\label{code-blocks}
167+\section{\texorpdfstring{Code Blocks}{Code Blocks}}\label{code-blocks}
166168
167169Code:
168170
@@ -186,9 +188,9 @@ These should not be escaped: \$ \\ \> \[ \{
186188
187189\begin{center}\rule{3in}{0.4pt}\end{center}
188190
189−\section{Lists}\label{lists}
191+\section{\texorpdfstring{Lists}{Lists}}\label{lists}
190192
191−\subsection{Unordered}\label{unordered}
193+\subsection{\texorpdfstring{Unordered}{Unordered}}\label{unordered}
192194
193195Asterisks tight:
194196
@@ -259,7 +261,7 @@ Minuses loose:
259261 Minus 3
260262\end{itemize}
261263
262−\subsection{Ordered}\label{ordered}
264+\subsection{\texorpdfstring{Ordered}{Ordered}}\label{ordered}
263265
264266Tight:
265267
@@ -325,7 +327,7 @@ Multiple paragraphs:
325327 Item 3.
326328\end{enumerate}
327329
328−\subsection{Nested}\label{nested}
330+\subsection{\texorpdfstring{Nested}{Nested}}\label{nested}
329331
330332\begin{itemize}
331333\itemsep1pt\parskip0pt\parsep0pt
@@ -390,7 +392,8 @@ Same thing but with paragraphs:
390392 Third
391393\end{enumerate}
392394
393−\subsection{Tabs and spaces}\label{tabs-and-spaces}
395+\subsection{\texorpdfstring{Tabs and
396+spaces}{Tabs and spaces}}\label{tabs-and-spaces}
394397
395398\begin{itemize}
396399\item
@@ -406,7 +409,8 @@ Same thing but with paragraphs:
406409 \end{itemize}
407410\end{itemize}
408411
409−\subsection{Fancy list markers}\label{fancy-list-markers}
412+\subsection{\texorpdfstring{Fancy list
413+markers}{Fancy list markers}}\label{fancy-list-markers}
410414
411415\begin{enumerate}
412416\def\labelenumi{(\arabic{enumi})}
@@ -494,7 +498,8 @@ B. Williams
494498
495499\begin{center}\rule{3in}{0.4pt}\end{center}
496500
497−\section{Definition Lists}\label{definition-lists}
501+\section{\texorpdfstring{Definition
502+Lists}{Definition Lists}}\label{definition-lists}
498503
499504Tight using spaces:
500505
@@ -597,7 +602,7 @@ orange fruit
597602\end{enumerate}
598603\end{description}
599604
600−\section{HTML Blocks}\label{html-blocks}
605+\section{\texorpdfstring{HTML Blocks}{HTML Blocks}}\label{html-blocks}
601606
602607Simple block on one line:
603608
@@ -659,7 +664,7 @@ Hr's:
659664
660665\begin{center}\rule{3in}{0.4pt}\end{center}
661666
662−\section{Inline Markup}\label{inline-markup}
667+\section{\texorpdfstring{Inline Markup}{Inline Markup}}\label{inline-markup}
663668
664669This is \emph{emphasized}, and so \emph{is this}.
665670
@@ -691,7 +696,8 @@ spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d.
691696
692697\begin{center}\rule{3in}{0.4pt}\end{center}
693698
694−\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}
699+\section{\texorpdfstring{Smart quotes, ellipses,
700+dashes}{Smart quotes, ellipses, dashes}}\label{smart-quotes-ellipses-dashes}
695701
696702``Hello,'' said the spider. ``\,`Shelob' is my name.''
697703
@@ -712,7 +718,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
712718
713719\begin{center}\rule{3in}{0.4pt}\end{center}
714720
715−\section{LaTeX}\label{latex}
721+\section{\texorpdfstring{LaTeX}{LaTeX}}\label{latex}
716722
717723\begin{itemize}
718724\itemsep1pt\parskip0pt\parsep0pt
@@ -760,7 +766,8 @@ Cat & 1 \\ \hline
760766
761767\begin{center}\rule{3in}{0.4pt}\end{center}
762768
763−\section{Special Characters}\label{special-characters}
769+\section{\texorpdfstring{Special
770+Characters}{Special Characters}}\label{special-characters}
764771
765772Here is some unicode:
766773
@@ -822,9 +829,9 @@ Minus: -
822829
823830\begin{center}\rule{3in}{0.4pt}\end{center}
824831
825−\section{Links}\label{links}
832+\section{\texorpdfstring{Links}{Links}}\label{links}
826833
827−\subsection{Explicit}\label{explicit}
834+\subsection{\texorpdfstring{Explicit}{Explicit}}\label{explicit}
828835
829836Just a \href{/url/}{URL}.
830837
@@ -844,7 +851,7 @@ Just a \href{/url/}{URL}.
844851
845852\href{}{Empty}.
846853
847−\subsection{Reference}\label{reference}
854+\subsection{\texorpdfstring{Reference}{Reference}}\label{reference}
848855
849856Foo \href{/url/}{bar}.
850857
@@ -872,7 +879,8 @@ Foo \href{/url/}{bar}.
872879
873880Foo \href{/url/}{biz}.
874881
875−\subsection{With ampersands}\label{with-ampersands}
882+\subsection{\texorpdfstring{With
883+ampersands}{With ampersands}}\label{with-ampersands}
876884
877885Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
878886URL}.
@@ -884,7 +892,7 @@ Here's an \href{/script?foo=1\&bar=2}{inline link}.
884892
885893Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
886894
887−\subsection{Autolinks}\label{autolinks}
895+\subsection{\texorpdfstring{Autolinks}{Autolinks}}\label{autolinks}
888896
889897With an ampersand: \url{http://example.com/?foo=1\&bar=2}
890898
@@ -913,7 +921,7 @@ or here: <http://example.com/>
913921
914922\begin{center}\rule{3in}{0.4pt}\end{center}
915923
916−\section{Images}\label{images}
924+\section{\texorpdfstring{Images}{Images}}\label{images}
917925
918926From ``Voyage dans la Lune'' by Georges Melies (1902):
919927
@@ -927,7 +935,7 @@ Here is a movie \includegraphics{movie.jpg} icon.
927935
928936\begin{center}\rule{3in}{0.4pt}\end{center}
929937
930−\section{Footnotes}\label{footnotes}
938+\section{\texorpdfstring{Footnotes}{Footnotes}}\label{footnotes}
931939
932940Here is a footnote reference,\footnote{Here is the footnote. It can go
933941 anywhere after the footnote reference. It need not be placed at the end of