aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-08-28 16:54:37 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-08-28 16:54:37 -0700
commit940515a00ba49b9feb3d736dc071059400f83015 (patch)
tree2f6fbada8191978574c2c16c4f4af7d1de822e5a /src/Text
parentdd5cb82348dfb2b8febb01db8bdc98ddeac394dc (diff)
downloadpandoc-940515a00ba49b9feb3d736dc071059400f83015.tar.gz
LaTeX reader: allow spaces in alignment spec in tables.
E.g. `{ l r c }`.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index b9ca986fb..e91ea1e82 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1116,12 +1116,13 @@ complexNatbibCitation mode = try $ do
parseAligns :: LP [Alignment]
parseAligns = try $ do
char '{'
- optional $ char '|'
+ let maybeBar = try $ spaces >> optional (char '|')
+ maybeBar
let cAlign = AlignCenter <$ char 'c'
let lAlign = AlignLeft <$ char 'l'
let rAlign = AlignRight <$ char 'r'
let alignChar = optional sp *> (cAlign <|> lAlign <|> rAlign)
- aligns' <- sepEndBy alignChar (optional $ char '|')
+ aligns' <- sepEndBy alignChar maybeBar
spaces
char '}'
spaces