Update tests suite to expect \texorpdfstring.
This commit is contained in:
parent
64bcb9fe03
commit
08d80809c2
4 changed files with 43 additions and 35 deletions
|
@ -52,6 +52,6 @@ tests = [ testGroup "code blocks"
|
|||
[ "unnumbered header" =:
|
||||
headerWith ("foo",["unnumbered"],[]) 1
|
||||
(text "Header 1" <> note (plain $ text "note")) =?>
|
||||
"\\section*{Header 1\\footnote{note}}\\label{foo}\n\\addcontentsline{toc}{section}{Header 1}\n"
|
||||
"\\section*{\\texorpdfstring{Header 1\\footnote{note}}{Header 1}}\\label{foo}\n\\addcontentsline{toc}{section}{Header 1}\n"
|
||||
]
|
||||
]
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
\begin{document}
|
||||
|
||||
\section{lhs test}\label{lhs-test}
|
||||
\section{\texorpdfstring{lhs test}{lhs test}}\label{lhs-test}
|
||||
|
||||
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
||||
return a single value:
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
\begin{document}
|
||||
|
||||
\section{lhs test}\label{lhs-test}
|
||||
\section{\texorpdfstring{lhs test}{lhs test}}\label{lhs-test}
|
||||
|
||||
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
||||
return a single value:
|
||||
|
|
|
@ -78,32 +78,34 @@ markdown test suite.
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Headers}\label{headers}
|
||||
\section{\texorpdfstring{Headers}{Headers}}\label{headers}
|
||||
|
||||
\subsection{Level 2 with an \href{/url}{embedded
|
||||
link}}\label{level-2-with-an-embedded-link}
|
||||
\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded
|
||||
link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}
|
||||
|
||||
\subsubsection{Level 3 with \emph{emphasis}}\label{level-3-with-emphasis}
|
||||
\subsubsection{\texorpdfstring{Level 3 with
|
||||
\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}
|
||||
|
||||
\paragraph{Level 4}\label{level-4}
|
||||
\paragraph{\texorpdfstring{Level 4}{Level 4}}\label{level-4}
|
||||
|
||||
\subparagraph{Level 5}\label{level-5}
|
||||
\subparagraph{\texorpdfstring{Level 5}{Level 5}}\label{level-5}
|
||||
|
||||
\section{Level 1}\label{level-1}
|
||||
\section{\texorpdfstring{Level 1}{Level 1}}\label{level-1}
|
||||
|
||||
\subsection{Level 2 with \emph{emphasis}}\label{level-2-with-emphasis}
|
||||
\subsection{\texorpdfstring{Level 2 with
|
||||
\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}
|
||||
|
||||
\subsubsection{Level 3}\label{level-3}
|
||||
\subsubsection{\texorpdfstring{Level 3}{Level 3}}\label{level-3}
|
||||
|
||||
with no blank line
|
||||
|
||||
\subsection{Level 2}\label{level-2}
|
||||
\subsection{\texorpdfstring{Level 2}{Level 2}}\label{level-2}
|
||||
|
||||
with no blank line
|
||||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Paragraphs}\label{paragraphs}
|
||||
\section{\texorpdfstring{Paragraphs}{Paragraphs}}\label{paragraphs}
|
||||
|
||||
Here's a regular paragraph.
|
||||
|
||||
|
@ -117,7 +119,7 @@ There should be a hard line break\\here.
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Block Quotes}\label{block-quotes}
|
||||
\section{\texorpdfstring{Block Quotes}{Block Quotes}}\label{block-quotes}
|
||||
|
||||
E-mail style:
|
||||
|
||||
|
@ -162,7 +164,7 @@ And a following paragraph.
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Code Blocks}\label{code-blocks}
|
||||
\section{\texorpdfstring{Code Blocks}{Code Blocks}}\label{code-blocks}
|
||||
|
||||
Code:
|
||||
|
||||
|
@ -186,9 +188,9 @@ These should not be escaped: \$ \\ \> \[ \{
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Lists}\label{lists}
|
||||
\section{\texorpdfstring{Lists}{Lists}}\label{lists}
|
||||
|
||||
\subsection{Unordered}\label{unordered}
|
||||
\subsection{\texorpdfstring{Unordered}{Unordered}}\label{unordered}
|
||||
|
||||
Asterisks tight:
|
||||
|
||||
|
@ -259,7 +261,7 @@ Minuses loose:
|
|||
Minus 3
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Ordered}\label{ordered}
|
||||
\subsection{\texorpdfstring{Ordered}{Ordered}}\label{ordered}
|
||||
|
||||
Tight:
|
||||
|
||||
|
@ -325,7 +327,7 @@ Multiple paragraphs:
|
|||
Item 3.
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Nested}\label{nested}
|
||||
\subsection{\texorpdfstring{Nested}{Nested}}\label{nested}
|
||||
|
||||
\begin{itemize}
|
||||
\itemsep1pt\parskip0pt\parsep0pt
|
||||
|
@ -390,7 +392,8 @@ Same thing but with paragraphs:
|
|||
Third
|
||||
\end{enumerate}
|
||||
|
||||
\subsection{Tabs and spaces}\label{tabs-and-spaces}
|
||||
\subsection{\texorpdfstring{Tabs and
|
||||
spaces}{Tabs and spaces}}\label{tabs-and-spaces}
|
||||
|
||||
\begin{itemize}
|
||||
\item
|
||||
|
@ -406,7 +409,8 @@ Same thing but with paragraphs:
|
|||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Fancy list markers}\label{fancy-list-markers}
|
||||
\subsection{\texorpdfstring{Fancy list
|
||||
markers}{Fancy list markers}}\label{fancy-list-markers}
|
||||
|
||||
\begin{enumerate}
|
||||
\def\labelenumi{(\arabic{enumi})}
|
||||
|
@ -494,7 +498,8 @@ B. Williams
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Definition Lists}\label{definition-lists}
|
||||
\section{\texorpdfstring{Definition
|
||||
Lists}{Definition Lists}}\label{definition-lists}
|
||||
|
||||
Tight using spaces:
|
||||
|
||||
|
@ -597,7 +602,7 @@ orange fruit
|
|||
\end{enumerate}
|
||||
\end{description}
|
||||
|
||||
\section{HTML Blocks}\label{html-blocks}
|
||||
\section{\texorpdfstring{HTML Blocks}{HTML Blocks}}\label{html-blocks}
|
||||
|
||||
Simple block on one line:
|
||||
|
||||
|
@ -659,7 +664,7 @@ Hr's:
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Inline Markup}\label{inline-markup}
|
||||
\section{\texorpdfstring{Inline Markup}{Inline Markup}}\label{inline-markup}
|
||||
|
||||
This is \emph{emphasized}, and so \emph{is this}.
|
||||
|
||||
|
@ -691,7 +696,8 @@ spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d.
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}
|
||||
\section{\texorpdfstring{Smart quotes, ellipses,
|
||||
dashes}{Smart quotes, ellipses, dashes}}\label{smart-quotes-ellipses-dashes}
|
||||
|
||||
``Hello,'' said the spider. ``\,`Shelob' is my name.''
|
||||
|
||||
|
@ -712,7 +718,7 @@ Ellipses\ldots{}and\ldots{}and\ldots{}.
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{LaTeX}\label{latex}
|
||||
\section{\texorpdfstring{LaTeX}{LaTeX}}\label{latex}
|
||||
|
||||
\begin{itemize}
|
||||
\itemsep1pt\parskip0pt\parsep0pt
|
||||
|
@ -760,7 +766,8 @@ Cat & 1 \\ \hline
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Special Characters}\label{special-characters}
|
||||
\section{\texorpdfstring{Special
|
||||
Characters}{Special Characters}}\label{special-characters}
|
||||
|
||||
Here is some unicode:
|
||||
|
||||
|
@ -822,9 +829,9 @@ Minus: -
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Links}\label{links}
|
||||
\section{\texorpdfstring{Links}{Links}}\label{links}
|
||||
|
||||
\subsection{Explicit}\label{explicit}
|
||||
\subsection{\texorpdfstring{Explicit}{Explicit}}\label{explicit}
|
||||
|
||||
Just a \href{/url/}{URL}.
|
||||
|
||||
|
@ -844,7 +851,7 @@ Just a \href{/url/}{URL}.
|
|||
|
||||
\href{}{Empty}.
|
||||
|
||||
\subsection{Reference}\label{reference}
|
||||
\subsection{\texorpdfstring{Reference}{Reference}}\label{reference}
|
||||
|
||||
Foo \href{/url/}{bar}.
|
||||
|
||||
|
@ -872,7 +879,8 @@ Foo \href{/url/}{bar}.
|
|||
|
||||
Foo \href{/url/}{biz}.
|
||||
|
||||
\subsection{With ampersands}\label{with-ampersands}
|
||||
\subsection{\texorpdfstring{With
|
||||
ampersands}{With ampersands}}\label{with-ampersands}
|
||||
|
||||
Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
|
||||
URL}.
|
||||
|
@ -884,7 +892,7 @@ Here's an \href{/script?foo=1\&bar=2}{inline link}.
|
|||
|
||||
Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}.
|
||||
|
||||
\subsection{Autolinks}\label{autolinks}
|
||||
\subsection{\texorpdfstring{Autolinks}{Autolinks}}\label{autolinks}
|
||||
|
||||
With an ampersand: \url{http://example.com/?foo=1\&bar=2}
|
||||
|
||||
|
@ -913,7 +921,7 @@ or here: <http://example.com/>
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Images}\label{images}
|
||||
\section{\texorpdfstring{Images}{Images}}\label{images}
|
||||
|
||||
From ``Voyage dans la Lune'' by Georges Melies (1902):
|
||||
|
||||
|
@ -927,7 +935,7 @@ Here is a movie \includegraphics{movie.jpg} icon.
|
|||
|
||||
\begin{center}\rule{3in}{0.4pt}\end{center}
|
||||
|
||||
\section{Footnotes}\label{footnotes}
|
||||
\section{\texorpdfstring{Footnotes}{Footnotes}}\label{footnotes}
|
||||
|
||||
Here is a footnote reference,\footnote{Here is the footnote. It can go
|
||||
anywhere after the footnote reference. It need not be placed at the end of
|
||||
|
|
Loading…
Reference in a new issue