diff options
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 1 | ||||
-rw-r--r-- | tests/latex-reader.latex | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index b6e2e4c0c..233f5a3d5 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -171,6 +171,7 @@ header = try $ do subs <- many (try (string "sub")) base <- try (string "section" >> return 1) <|> (string "paragraph" >> return 4) optional (char '*') + optional $ bracketedText '[' ']' -- alt title char '{' title' <- manyTill inline (char '}') spaces diff --git a/tests/latex-reader.latex b/tests/latex-reader.latex index fa2d49294..589a83e82 100644 --- a/tests/latex-reader.latex +++ b/tests/latex-reader.latex @@ -35,7 +35,7 @@ Level 4 Level 5 -\section{Level 1} +\section[alt title ignored]{Level 1} \subsection{Level 2 with \emph{emphasis}} |