-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add options with escapeSpecialCharacters (#65)
Fixes #26. Fixes #63. As described in #63, this introduces the concept of options with single option, `escapeSpecialCharacters`. The option defaults to: * `true` when called for a template literal's string tag * `false` when called as a function ```js // "\$hello!" dedent.options({ escapeSpecialCharacters: false })` $hello! `; ``` I'd played with allowing passing it in as a first argument instead of a string or template literal strings array, but that got complex. I suppose we can do that as a followup if people really want. cc @G-Rath @sirian - what do you think?
- Loading branch information
1 parent
97d6cc0
commit 6eea13c
Showing
5 changed files
with
340 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.