aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-04-06 15:11:18 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-04-06 15:11:49 -0700
commitfcddd0e4bd5f1b5fd4eb33e291fb9ccc2358d43f (patch)
tree31faae27ec173df848328f5aef266f60bfa2eb82 /src/Text/Pandoc
parent9f3f4298ddb51f73da4a62dfc32394b082dd7fe5 (diff)
downloadpandoc-fcddd0e4bd5f1b5fd4eb33e291fb9ccc2358d43f.tar.gz
LaTeX reader: handle @{} and p{length} in tabular.
The length is not actually recorded, but at least we get a table. Closes #1180.
Diffstat (limited to 'src/Text/Pandoc')
-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 f23a5b35e..fd761dbec 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1168,12 +1168,13 @@ complexNatbibCitation mode = try $ do
parseAligns :: LP [Alignment]
parseAligns = try $ do
char '{'
- let maybeBar = try $ spaces >> optional (char '|')
+ let maybeBar = skipMany $ sp <|> () <$ char '|' <|> () <$ try (string "@{}")
maybeBar
let cAlign = AlignCenter <$ char 'c'
let lAlign = AlignLeft <$ char 'l'
let rAlign = AlignRight <$ char 'r'
- let alignChar = optional sp *> (cAlign <|> lAlign <|> rAlign)
+ let parAlign = AlignLeft <$ (char 'p' >> braced)
+ let alignChar = cAlign <|> lAlign <|> rAlign <|> parAlign
aligns' <- sepEndBy alignChar maybeBar
spaces
char '}'