Skip to content

Commit

Permalink
TeX: in parsing array, ignore | in column specs.
Browse files Browse the repository at this point in the history
We have no way to represent this in EArray, currently.
Ignoring them seems better than failing altogether.  See #127.
  • Loading branch information
jgm committed Dec 12, 2018
1 parent c69a04b commit fdc238a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/TeXMath/Readers/TeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,12 @@ arrayLine = notFollowedBy (ctrlseq "end" >> return '\n') >>

arrayAlignments :: TP [Alignment]
arrayAlignments = try $ do
as <- braces (many letter)
as <- braces (many (letter <|> char '|'))
let letterToAlignment 'l' = AlignLeft
letterToAlignment 'c' = AlignCenter
letterToAlignment 'r' = AlignRight
letterToAlignment _ = AlignCenter
return $ map letterToAlignment as
return $ map letterToAlignment $ filter (/= '|') as

environment :: TP Exp
environment = do
Expand Down

0 comments on commit fdc238a

Please sign in to comment.