Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't stop interpolation when a lone '$' is encountered
Should address the problem reported in #19.
  • Loading branch information
tmhedberg committed Dec 16, 2017
1 parent 7026aad commit 8a616b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Data/String/Here/Interpolated.hs
Expand Up @@ -145,6 +145,6 @@ p_esc = Esc <$> (char '\\' *> anyChar)

p_lit :: Parser StringPart
p_lit = fmap Lit $
try (litCharTil $ lookAhead p_antiOpen <|> lookAhead (string "\\"))
try (litCharTil $ try $ lookAhead p_antiOpen <|> lookAhead (string "\\"))
<|> litCharTil eof
where litCharTil = manyTill $ noneOf ['\\']

0 comments on commit 8a616b3

Please sign in to comment.