camunda / feel-scala

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

Double quotes in string literal are escaped #778

Closed StrekoZ closed 6 months ago

StrekoZ commented 6 months ago

Describe the bug When trying to add a quote inside string \", it's got replaced to \\\"

To Reproduce Execute in FEEL playground string length("\"") - string length(x) with a context { "x": "\"" }

Expected behavior Expected that length for both strings is equal (difference is 0)

Environment

StrekoZ commented 6 months ago

This place seems suspicious: https://github.com/camunda/feel-scala/pull/763/files#r1428154128 However issue also is reproducable in older version of FEEL Playgound: https://camunda.github.io/feel-scala/docs/playground/ (1.16 and 1.15 as well)

saig0 commented 6 months ago

@StrekoZ thank you for reporting. :+1: