git.iko.soy/typeable/pandoc
on master help sign in
Reader.LaTeX.hs: remove trailing whitespace
commit9cad5499c45022b9893156bb5e0468cabefca974 authorAlbert Krewinkel <albert@zeitkraut.de> dateTue 8 Sep 2020, 10:33 (6 years ago) parent10c6c41
1 file changed+7−7
src/Text/Pandoc/Readers/LaTeX.hs+7−7
src/Text/Pandoc/Readers/LaTeX.hs+7−7
@@ -2168,7 +2168,7 @@ parseTableRow envname prefsufs = do
21682168 cells <- mapM (\ts -> setInput ts >> parseTableCell) rawcells
21692169 setInput oldInput
21702170 spaces
2171− -- Because of table normalization performed by Text.Pandoc.Builder.table,
2171+ -- Because of table normalization performed by Text.Pandoc.Builder.table,
21722172 -- we need to remove empty cells
21732173 return $ Row nullAttr $ filter (\c -> c /= emptyCell) cells
21742174
@@ -2176,9 +2176,9 @@ parseTableCell :: PandocMonad m => LP m Cell
21762176parseTableCell = do
21772177 spaces
21782178 updateState $ \st -> st{ sInTableCell = True }
2179− cell' <- ( multicolumnCell
2180− <|> multirowCell
2181− <|> parseSimpleCell
2179+ cell' <- ( multicolumnCell
2180+ <|> multirowCell
2181+ <|> parseSimpleCell
21822182 <|> parseEmptyCell
21832183 )
21842184 updateState $ \st -> st{ sInTableCell = False }
@@ -2186,7 +2186,7 @@ parseTableCell = do
21862186 return cell'
21872187 where
21882188 -- The parsing of empty cells is important in LaTeX, especially when dealing
2189− -- with multirow/multicolumn. See #6603.
2189+ -- with multirow/multicolumn. See #6603.
21902190 parseEmptyCell = optional spaces >> return emptyCell <* optional spaces
21912191
21922192cellAlignment :: PandocMonad m => LP m Alignment
@@ -2213,7 +2213,7 @@ multirowCell = controlSeq "multirow" >> do
22132213 -- However, everything except `nrows` and `text` make
22142214 -- sense in the context of the Pandoc AST
22152215 _ <- optional $ symbol '[' *> cellAlignment <* symbol ']' -- vertical position
2216− nrows <- fmap (fromMaybe 1 . safeRead . untokenize) braced
2216+ nrows <- fmap (fromMaybe 1 . safeRead . untokenize) braced
22172217 _ <- optional $ symbol '[' *> manyTill anyTok (symbol ']') -- bigstrut-related
22182218 _ <- symbol '{' *> manyTill anyTok (symbol '}') -- Cell width
22192219 _ <- optional $ symbol '[' *> manyTill anyTok (symbol ']') -- Length used for fine-tuning
@@ -2228,7 +2228,7 @@ multicolumnCell = controlSeq "multicolumn" >> do
22282228 let singleCell = do
22292229 content <- plainify <$> blocks
22302230 return $ cell alignment (RowSpan 1) (ColSpan span') content
2231−
2231+
22322232 -- Two possible contents: either a \multirow cell, or content.
22332233 -- E.g. \multicol{1}{c}{\multirow{2}{1em}{content}}
22342234 -- Note that a \multirow cell can be nested in a \multicolumn,