diff --git a/src/Lexer.hs b/src/Lexer.hs index b4ad0b8..04fa84f 100644 --- a/src/Lexer.hs +++ b/src/Lexer.hs @@ -53,8 +53,8 @@ data Token | BracketClose | MathInlineOpen | MathInlineClose - | MathsMultilineOpen - | MathsMultilineClose + | MathMultilineOpen + | MathMultilineClose | NumericEntity Int | Module Text | QuoteOpen @@ -243,7 +243,7 @@ labeledLink = do ] mathMultiline :: Lexer -mathMultiline = delimited "\\[" "\\]" MathsMultilineOpen MathsMultilineClose +mathMultiline = delimited "\\[" "\\]" MathMultilineOpen MathMultilineClose mathInline :: Lexer mathInline = delimited "\\(" "\\)" MathInlineOpen MathInlineClose diff --git a/test/Spec.hs b/test/Spec.hs index 656159e..7ddbcff 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -93,9 +93,9 @@ anchors = maths :: IO () maths = do "\\[some math\\]" - `shouldLexTo` [ (1, 1, MathsMultilineOpen) + `shouldLexTo` [ (1, 1, MathMultilineOpen) , (1, 3, Token "some math") - , (1, 12, MathsMultilineClose) + , (1, 12, MathMultilineClose) ] "\\(other maths\\)" `shouldLexTo` [ (1, 1, MathInlineOpen)