LaTeX reader: allow spaces in alignment spec in tables.
E.g. `{ l r c }`.
This commit is contained in:
parent
dd5cb82348
commit
940515a00b
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue