Clarify the current escaping rules as discussed in #39 Signed-off-by: Mark Thomas <markt@apache.org>
diff --git a/spec/src/main/asciidoc/ELSpec.adoc b/spec/src/main/asciidoc/ELSpec.adoc index 80c1fd2..9c61a51 100644 --- a/spec/src/main/asciidoc/ELSpec.adoc +++ b/spec/src/main/asciidoc/ELSpec.adoc
@@ -478,10 +478,14 @@ `FloatingPointLiteral` construct in link:ELSpec.html#a524[Collected Syntax] -* String - With single and double quotes - `"` -is escaped as `\"`, `'` is escaped as `\'`, and `\` is escaped as `\\`. -Quotes only need to be escaped in a string value enclosed in the same -type of quote +* String - Enclosed with single or double quotes with the following rules +for escaping the enclosed string: +** `\` must be escaped as `\\` +** `"` must be escaped as `\"` when the string is enclosed with `"` +** `"` may be escaped as `\"` when the string is enclosed with `'` +** `'` must be escaped as `\'` when the string is enclosed with `'` +** `'` may be escaped as `\'` when the string is enclosed with `"` +** no other escaping is permitted * Null - `null`