Skip to content

Commit

Permalink
update, fix a bug
Browse files Browse the repository at this point in the history
Some question might have many answers, which spilted by newline.
This commit add this function to split answers with Data.Text.lines
  • Loading branch information
Qinka committed Nov 23, 2017
1 parent 6d530b2 commit 35cfb62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fluffy/src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ getGapFillingR i = do
case answer of
Just x' -> do
let x = T.reverse . T.dropWhile (==' ') . T.reverse $ T.dropWhile (== ' ') x'
rt = x == gfAnswer
rt = x `elem` T.lines gfAnswer
goal = goal' + (if rt then 1 else 0)
total = total' + 1
return (goal, total,GFForm rt)
Expand Down

0 comments on commit 35cfb62

Please sign in to comment.