diff --git a/libraries/AdaptiveExpressions/parser/ExpressionAntlrLexer.g4 b/libraries/AdaptiveExpressions/parser/ExpressionAntlrLexer.g4 index 871230ec7c..0309f24fb5 100644 --- a/libraries/AdaptiveExpressions/parser/ExpressionAntlrLexer.g4 +++ b/libraries/AdaptiveExpressions/parser/ExpressionAntlrLexer.g4 @@ -87,6 +87,6 @@ TEMPLATE : '$' '{' (STRING | OBJECT_DEFINITION | ~[\r\n{}'"`])+ '}'; ESCAPE_CHARACTER : '\\' ~[\r\n]?; -TEXT_CONTENT : ~[\r\n]; +TEXT_CONTENT : . ; diff --git a/tests/AdaptiveExpressions.Tests/ExpressionParserTests.cs b/tests/AdaptiveExpressions.Tests/ExpressionParserTests.cs index a5c802d5f0..199c85a09c 100644 --- a/tests/AdaptiveExpressions.Tests/ExpressionParserTests.cs +++ b/tests/AdaptiveExpressions.Tests/ExpressionParserTests.cs @@ -383,6 +383,12 @@ public class ExpressionParserTests Test("json(`{\"foo\":${{text:\"hello\"}},\"item\": \"${world}\"}`).foo.text", "hello"), Test("json(`{\"foo\":${{\"text\":\"hello\"}},\"item\": \"${world}\"}`).foo.text", "hello"), Test("`{expr: hello all}`", "{expr: hello all}"), + Test("`${hello}\n\n${world}`", "hello\n\nworld"), + Test("`${hello}\r\n${world}`", "hello\r\nworld"), + Test("`\n\n${world}`", "\n\nworld"), + Test("`\r\n${world}`", "\r\nworld"), + Test("`${hello}\n\n`", "hello\n\n"), + Test("`${hello}\r\n`", "hello\r\n"), #endregion #region SetPathToProperty test