-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Labels
type: featureNew enhancement or requestNew enhancement or request
Description
This pulls together #2, #26, #45, #46:
- Doesn't handle \` escapes correctly #2: Backticks were confirmed as expected to be (un-)escaped properly when
dedentis used with template literal strings.- By extension, it makes sense to consider other native template literal string escapings as unwanted: escaped
$and{characters are not handled correctly #45 -> fix: consume first level of escaping of$and{characters #46
- By extension, it makes sense to consider other native template literal string escapings as unwanted: escaped
- Handle escaped backticks is wrong when dedent used as function #26: On the other hand, when
dedentis used as a function, users aren't expecting that special character escaping
I think the "right" (or: least unexpected) way would be to add an option with a not-very-savory name like escapeSpecialCharacters. The option would default to:
truewhen called for a template literal stringfalsewhen called as a function
Proposal:
- Let's add this option in separately from fix: consume first level of escaping of
$and{characters #46, to resolve this issue and 26 - I can release a new minor version that includes this option and 26
- I'm a little hesitant to merge that PR before this option is in, in case folks are relying on the existing behavior
Metadata
Metadata
Assignees
Labels
type: featureNew enhancement or requestNew enhancement or request