aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-14 23:23:07 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2010-03-14 23:23:07 +0000
commit139b2ed6d18940eb41497f5379359b92a347cf61 (patch)
treec235d0c02199609ff6d8a60b5a828faeed8d45f0
parent36a19e0f2e8899a895a4ee0da2bdae86b5443290 (diff)
downloadpandoc-139b2ed6d18940eb41497f5379359b92a347cf61.tar.gz
LaTeX reader: Ignore alt title in section headers.
Partially resolves Issue #202. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1886 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs1
-rw-r--r--tests/latex-reader.latex2
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}}