camunda / feel-scala

FEEL parser and interpreter written in Scala
https://camunda.github.io/feel-scala/
Apache License 2.0
121 stars 50 forks source link

Incorrect escaping in strings #879

Open StrekoZ opened 2 months ago

StrekoZ commented 2 months ago

Describe the bug Incorrect escping of backslash

To Reproduce

  1. Open playground: https://camunda.github.io/feel-scala/docs/playground/
  2. Use expression x = "\\"
  3. Use context { "x": "\\" }

Observed behavior image

Expected behavior Output should be true

Notes If expression is x, then in output there is string with 2 slashes instead of one If expression is "\\" then currently output is string with 4 slashes, which is very srange

Environment

StrekoZ commented 2 months ago

Similar problem described at: https://github.com/camunda/feel-scala/issues/778 (slightly different use case, but also related to backslash and escaping)

saig0 commented 1 month ago

@StrekoZ thank you for reporting. :+1: