diff --git a/CHANGELOG.md b/CHANGELOG.md index 2323b8e..efebf76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,3 +30,7 @@ :i -- Print options ``` * Accidentally made table mode useless + + +* 2.0.0.1 -- 2022-03-23 + ** Made table mode useful again diff --git a/src/Process.hs b/src/Process.hs index 86ebdc7..d44e6d4 100644 --- a/src/Process.hs +++ b/src/Process.hs @@ -40,10 +40,11 @@ flattenForm xs = applyUntil (all isElem) (concatMap foldForm) $ groupForm xs reactProdP :: Parser ([Element], [Element]) reactProdP = ((,) `on` (flattenForm . concat)) - <$> formulaP `sepByParser` charP '+' + <$> formulaP' `sepByParser` charP '+' <*> (whiteSpace *> separators - *> formulaP `sepByParser` charP '+') + *> formulaP' `sepByParser` charP '+') where + formulaP' = (\a b -> map (onLeaforBranch (second (*a)) (second (*a))) b) <$> (whiteSpace *> numP <|> pure 1) <*> formulaP separators = foldr1 (<|>) [ stringP x | x <- ["->", "→", "\\rightarrow"] ]