Commit 71865b14 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix unlit

The arguments to isPrefixOf were the wrong way round. We want to see if
the line starts "\\begin{code}", not if the line is a prefix of that string.
parent c3bd64bb
......@@ -41,8 +41,8 @@ classify ('#':s) = case tokens s of
(t@(_:_), str'):_ -> Just (t, str')
_ -> Nothing
classify ('\\':s)
| s `isPrefixOf` "begin{code}" = BeginCode
| s `isPrefixOf` "end{code}" = EndCode
| "begin{code}" `isPrefixOf` s = BeginCode
| "end{code}" `isPrefixOf` s = EndCode
classify s | all isSpace s = Blank s
classify s = Ordinary s
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment