Auto-Escape String Delimiters in String Literals #5009
Labels
enhancement
Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.
feature-autocomplete
feature-self-closing-pairs
AC issues specific to the handling of self-closing pairs
Justification
SCP is currently bailing out when it determines that the caret is inside a string literal. There's an opportunity to handle double-quote escaping here - something that is still very frequently being asked about on SO.
Description
Instead of bailing out, handle
"
keypress inside a string literal by doubling the character and placing the caret after the escaped quotes:One consideration is the closing character - SCP behavior needs to remain consistent, so if the caret is just before the string-closing quote, auto-escape should not happen (i.e. preserve current behavior):
Adding escaped double-quotes at the end of a string literal would need to be done by adding a temporary space, that can then be removed:
The text was updated successfully, but these errors were encountered: