git.iko.soy/typeable/pandoc
on master help sign in
Update tests suite to expect \texorpdfstring.
08d8080Vaclav Zeman
tests/Tests/Writers/LaTeX.hs+1−1
@@ -52,6 +52,6 @@ tests = [ testGroup "code blocks"
52 [ "unnumbered header" =:
52 [ "unnumbered header" =:
53 headerWith ("foo",["unnumbered"],[]) 1
53 headerWith ("foo",["unnumbered"],[]) 1
54 (text "Header 1" <> note (plain $ text "note")) =?>
54 (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"
56 ]
56 ]
57 ]
57 ]
tests/lhs-test.latex+1−1
@@ -68,7 +68,7 @@
68
68
69\begin{document}
69\begin{document}
70
70
71−\section{lhs test}\label{lhs-test}
71+\section{\texorpdfstring{lhs test}{lhs test}}\label{lhs-test}
72
72
73\texttt{unsplit} is an arrow that takes a pair of values and combines them to
73\texttt{unsplit} is an arrow that takes a pair of values and combines them to
74return a single value:
74return a single value:
tests/lhs-test.latex+lhs+1−1
@@ -49,7 +49,7 @@
49
49
50\begin{document}
50\begin{document}
51
51
52−\section{lhs test}\label{lhs-test}
52+\section{\texorpdfstring{lhs test}{lhs test}}\label{lhs-test}
53
53
54\texttt{unsplit} is an arrow that takes a pair of values and combines them to
54\texttt{unsplit} is an arrow that takes a pair of values and combines them to
55return a single value:
55return a single value:
tests/writer.latex+40−32
@@ -78,32 +78,34 @@ markdown test suite.
78
78
79\begin{center}\rule{3in}{0.4pt}\end{center}
79\begin{center}\rule{3in}{0.4pt}\end{center}
80
80
81−\section{Headers}\label{headers}
81+\section{\texorpdfstring{Headers}{Headers}}\label{headers}
82
82
83−\subsection{Level 2 with an \href{/url}{embedded
83+\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
84−link}}\label{level-2-with-an-embedded-link}
84+link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}
85
85
86+\subsubsection{\texorpdfstring{Level 3 with
86−\subsubsection{Level 3 with \emph{emphasis}}\label{level-3-with-emphasis}
87+\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}
87
88
88−\paragraph{Level 4}\label{level-4}
89+\paragraph{\texorpdfstring{Level 4}{Level 4}}\label{level-4}
89
90
90−\subparagraph{Level 5}\label{level-5}
91+\subparagraph{\texorpdfstring{Level 5}{Level 5}}\label{level-5}
91
92
92−\section{Level 1}\label{level-1}
93+\section{\texorpdfstring{Level 1}{Level 1}}\label{level-1}
93
94
95+\subsection{\texorpdfstring{Level 2 with
94−\subsection{Level 2 with \emph{emphasis}}\label{level-2-with-emphasis}
96+\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}
95
97
96−\subsubsection{Level 3}\label{level-3}
98+\subsubsection{\texorpdfstring{Level 3}{Level 3}}\label{level-3}
97
99
98with no blank line
100with no blank line
99
101
100−\subsection{Level 2}\label{level-2}
102+\subsection{\texorpdfstring{Level 2}{Level 2}}\label{level-2}
101
103
102with no blank line
104with no blank line
103
105
104\begin{center}\rule{3in}{0.4pt}\end{center}
106\begin{center}\rule{3in}{0.4pt}\end{center}
105
107
106−\section{Paragraphs}\label{paragraphs}
108+\section{\texorpdfstring{Paragraphs}{Paragraphs}}\label{paragraphs}
107
109
108Here's a regular paragraph.
110Here's a regular paragraph.
109
111
@@ -117,7 +119,7 @@ There should be a hard line break\\here.
117
119
118\begin{center}\rule{3in}{0.4pt}\end{center}
120\begin{center}\rule{3in}{0.4pt}\end{center}
119
121
120−\section{Block Quotes}\label{block-quotes}
122+\section{\texorpdfstring{Block Quotes}{Block Quotes}}\label{block-quotes}
121
123
122E-mail style:
124E-mail style:
123
125
@@ -162,7 +164,7 @@ And a following paragraph.
162
164
163\begin{center}\rule{3in}{0.4pt}\end{center}
165\begin{center}\rule{3in}{0.4pt}\end{center}
164
166
165−\section{Code Blocks}\label{code-blocks}
167+\section{\texorpdfstring{Code Blocks}{Code Blocks}}\label{code-blocks}
166
168
167Code:
169Code:
168
170
@@ -186,9 +188,9 @@ These should not be escaped: \$ \\ \> \[ \{
186
188
187\begin{center}\rule{3in}{0.4pt}\end{center}
189\begin{center}\rule{3in}{0.4pt}\end{center}
188
190
189−\section{Lists}\label{lists}
191+\section{\texorpdfstring{Lists}{Lists}}\label{lists}
190
192
191−\subsection{Unordered}\label{unordered}
193+\subsection{\texorpdfstring{Unordered}{Unordered}}\label{unordered}
192
194
193Asterisks tight:
195Asterisks tight:
194
196
@@ -259,7 +261,7 @@ Minuses loose:
259 Minus 3
261 Minus 3
260\end{itemize}
262\end{itemize}
261
263
262−\subsection{Ordered}\label{ordered}
264+\subsection{\texorpdfstring{Ordered}{Ordered}}\label{ordered}
263
265
264Tight:
266Tight:
265
267
@@ -325,7 +327,7 @@ Multiple paragraphs:
325 Item 3.
327 Item 3.
326\end{enumerate}
328\end{enumerate}
327
329
328−\subsection{Nested}\label{nested}
330+\subsection{\texorpdfstring{Nested}{Nested}}\label{nested}
329
331
330\begin{itemize}
332\begin{itemize}
331\itemsep1pt\parskip0pt\parsep0pt
333\itemsep1pt\parskip0pt\parsep0pt
@@ -390,7 +392,8 @@ Same thing but with paragraphs:
390 Third
392 Third
391\end{enumerate}
393\end{enumerate}
392
394
395+\subsection{\texorpdfstring{Tabs and
393−\subsection{Tabs and spaces}\label{tabs-and-spaces}
396+spaces}{Tabs and spaces}}\label{tabs-and-spaces}
394
397
395\begin{itemize}
398\begin{itemize}
396\item
399\item
@@ -406,7 +409,8 @@ Same thing but with paragraphs:
406 \end{itemize}
409 \end{itemize}
407\end{itemize}
410\end{itemize}
408
411
412+\subsection{\texorpdfstring{Fancy list
409−\subsection{Fancy list markers}\label{fancy-list-markers}
413+markers}{Fancy list markers}}\label{fancy-list-markers}
410
414
411\begin{enumerate}
415\begin{enumerate}
412\def\labelenumi{(\arabic{enumi})}
416\def\labelenumi{(\arabic{enumi})}
@@ -494,7 +498,8 @@ B. Williams
494
498
495\begin{center}\rule{3in}{0.4pt}\end{center}
499\begin{center}\rule{3in}{0.4pt}\end{center}
496
500
501+\section{\texorpdfstring{Definition
497−\section{Definition Lists}\label{definition-lists}
502+Lists}{Definition Lists}}\label{definition-lists}
498
503
499Tight using spaces:
504Tight using spaces:
500
505
@@ -597,7 +602,7 @@ orange fruit
597\end{enumerate}
602\end{enumerate}
598\end{description}
603\end{description}
599
604
600−\section{HTML Blocks}\label{html-blocks}
605+\section{\texorpdfstring{HTML Blocks}{HTML Blocks}}\label{html-blocks}
601
606
602Simple block on one line:
607Simple block on one line:
603
608
@@ -659,7 +664,7 @@ Hr's:
659
664
660\begin{center}\rule{3in}{0.4pt}\end{center}
665\begin{center}\rule{3in}{0.4pt}\end{center}
661
666
662−\section{Inline Markup}\label{inline-markup}
667+\section{\texorpdfstring{Inline Markup}{Inline Markup}}\label{inline-markup}
663
668
664This is \emph{emphasized}, and so \emph{is this}.
669This is \emph{emphasized}, and so \emph{is this}.
665
670
@@ -691,7 +696,8 @@ spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d.
691
696
692\begin{center}\rule{3in}{0.4pt}\end{center}
697\begin{center}\rule{3in}{0.4pt}\end{center}
693
698
699+\section{\texorpdfstring{Smart quotes, ellipses,
694−\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}
700+dashes}{Smart quotes, ellipses, dashes}}\label{smart-quotes-ellipses-dashes}
695
701
696``Hello,'' said the spider. ``\,`Shelob' is my name.''
702``Hello,'' said the spider. ``\,`Shelob' is my name.''
697
703
@@ -712,7 +718,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
712
718
713\begin{center}\rule{3in}{0.4pt}\end{center}
719\begin{center}\rule{3in}{0.4pt}\end{center}
714
720
715−\section{LaTeX}\label{latex}
721+\section{\texorpdfstring{LaTeX}{LaTeX}}\label{latex}
716
722
717\begin{itemize}
723\begin{itemize}
718\itemsep1pt\parskip0pt\parsep0pt
724\itemsep1pt\parskip0pt\parsep0pt
@@ -760,7 +766,8 @@ Cat & 1 \\ \hline
760
766
761\begin{center}\rule{3in}{0.4pt}\end{center}
767\begin{center}\rule{3in}{0.4pt}\end{center}
762
768
769+\section{\texorpdfstring{Special
763−\section{Special Characters}\label{special-characters}
770+Characters}{Special Characters}}\label{special-characters}
764
771
765Here is some unicode:
772Here is some unicode:
766
773
@@ -822,9 +829,9 @@ Minus: -
822
829
823\begin{center}\rule{3in}{0.4pt}\end{center}
830\begin{center}\rule{3in}{0.4pt}\end{center}
824
831
825−\section{Links}\label{links}
832+\section{\texorpdfstring{Links}{Links}}\label{links}
826
833
827−\subsection{Explicit}\label{explicit}
834+\subsection{\texorpdfstring{Explicit}{Explicit}}\label{explicit}
828
835
829Just a \href{/url/}{URL}.
836Just a \href{/url/}{URL}.
830
837
@@ -844,7 +851,7 @@ Just a \href{/url/}{URL}.
844
851
845\href{}{Empty}.
852\href{}{Empty}.
846
853
847−\subsection{Reference}\label{reference}
854+\subsection{\texorpdfstring{Reference}{Reference}}\label{reference}
848
855
849Foo \href{/url/}{bar}.
856Foo \href{/url/}{bar}.
850
857
@@ -872,7 +879,8 @@ Foo \href{/url/}{bar}.
872
879
873Foo \href{/url/}{biz}.
880Foo \href{/url/}{biz}.
874
881
882+\subsection{\texorpdfstring{With
875−\subsection{With ampersands}\label{with-ampersands}
883+ampersands}{With ampersands}}\label{with-ampersands}
876
884
877Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
885Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
878URL}.
886URL}.
@@ -884,7 +892,7 @@ Here's an \href{/script?foo=1\&bar=2}{inline link}.
884
892
885Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
893Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
886
894
887−\subsection{Autolinks}\label{autolinks}
895+\subsection{\texorpdfstring{Autolinks}{Autolinks}}\label{autolinks}
888
896
889With an ampersand: \url{http://example.com/?foo=1\&bar=2}
897With an ampersand: \url{http://example.com/?foo=1\&bar=2}
890
898
@@ -913,7 +921,7 @@ or here: <http://example.com/>
913
921
914\begin{center}\rule{3in}{0.4pt}\end{center}
922\begin{center}\rule{3in}{0.4pt}\end{center}
915
923
916−\section{Images}\label{images}
924+\section{\texorpdfstring{Images}{Images}}\label{images}
917
925
918From ``Voyage dans la Lune'' by Georges Melies (1902):
926From ``Voyage dans la Lune'' by Georges Melies (1902):
919
927
@@ -927,7 +935,7 @@ Here is a movie \includegraphics{movie.jpg} icon.
927
935
928\begin{center}\rule{3in}{0.4pt}\end{center}
936\begin{center}\rule{3in}{0.4pt}\end{center}
929
937
930−\section{Footnotes}\label{footnotes}
938+\section{\texorpdfstring{Footnotes}{Footnotes}}\label{footnotes}
931
939
932Here is a footnote reference,\footnote{Here is the footnote. It can go
940Here is a footnote reference,\footnote{Here is the footnote. It can go
933 anywhere after the footnote reference. It need not be placed at the end of
941 anywhere after the footnote reference. It need not be placed at the end of