Skip to content

Instantly share code, notes, and snippets.

@NaeosPsy

NaeosPsy/wtf.ex Secret

Created April 6, 2021 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NaeosPsy/12d328fc646e36c92d870744ab673eb5 to your computer and use it in GitHub Desktop.
Save NaeosPsy/12d328fc646e36c92d870744ab673eb5 to your computer and use it in GitHub Desktop.
escaped_value =
ignore(string("\""))
|> utf8_string([not: ?"], min: 0)
|> repeat((string("\"\"")) |> utf8_string([not: ?"], min: 0))
|> ignore(string("\""))
|> reduce({Enum, :join, [""]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment