Skip to content

Commit

Permalink
Fix 197
Browse files Browse the repository at this point in the history
Closes #197
  • Loading branch information
dasJ committed Jun 26, 2024
1 parent c67a7b6 commit 56b6379
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Nixfmt/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ indentedStringPart =
( chunk "''\\n"
<|> chunk "''\\r"
<|> chunk "''\\t"
<|> chunk "''\\'"
<|> chunk "''\\"
-- ''\ followed by any char throws away the ''\ part, leaving just the char
*> (Text.singleton <$> anySingle)
<|> chunk "''$"
<|> chunk "'''"
Expand Down
3 changes: 3 additions & 0 deletions test/correct/regression-197.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
''
''\'''${A}
''

0 comments on commit 56b6379

Please sign in to comment.