@putout/plugin-remove-useless-escape 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,6 +101,9 @@ function isEscaped(raw) {
|
|
|
101
101
|
if (!raw.includes('\\'))
|
|
102
102
|
return false;
|
|
103
103
|
|
|
104
|
+
if (raw.includes('\\h') && !raw.includes('\\\\h'))
|
|
105
|
+
return true;
|
|
106
|
+
|
|
104
107
|
if (/\\\\/g.test(raw))
|
|
105
108
|
return false;
|
|
106
109
|
|
|
@@ -143,7 +146,8 @@ function unEscape(raw) {
|
|
|
143
146
|
.replaceAll('\\$', '$')
|
|
144
147
|
.replaceAll('\\{', '{')
|
|
145
148
|
.replaceAll('\\.', '.')
|
|
146
|
-
.replace(/(\\),/, ',')
|
|
149
|
+
.replace(/(\\),/, ',')
|
|
150
|
+
.replaceAll('\\h', 'h');
|
|
147
151
|
|
|
148
152
|
for (const emoji of match(raw)) {
|
|
149
153
|
raw = raw.replace(createEncodedRegExp(emoji), emoji);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-remove-useless-escape",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout plugin adds ability to find and remove useless escape",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@putout/plugin-madrun": "*",
|
|
40
40
|
"@putout/plugin-regexp": "*",
|
|
41
|
-
"@putout/test": "^
|
|
41
|
+
"@putout/test": "^9.0.0",
|
|
42
42
|
"c8": "^9.0.0",
|
|
43
|
-
"eslint": "^9.0.0
|
|
44
|
-
"eslint-plugin-n": "^17.0.0
|
|
43
|
+
"eslint": "^9.0.0",
|
|
44
|
+
"eslint-plugin-n": "^17.0.0",
|
|
45
45
|
"eslint-plugin-putout": "^22.0.0",
|
|
46
46
|
"madrun": "^10.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"putout": ">=
|
|
49
|
+
"putout": ">=35"
|
|
50
50
|
},
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"engines": {
|