pruny 1.9.1 → 1.9.2
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.
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9447,7 +9447,7 @@ async function scanUnusedExports(config) {
|
|
|
9447
9447
|
const lines = content.split(`
|
|
9448
9448
|
`);
|
|
9449
9449
|
let inMultilineComment = false;
|
|
9450
|
-
let
|
|
9450
|
+
let inTemplateLiteral = false;
|
|
9451
9451
|
for (const line of lines) {
|
|
9452
9452
|
const trimmed = line.trim();
|
|
9453
9453
|
if (trimmed.includes("/*"))
|
|
@@ -9458,6 +9458,12 @@ async function scanUnusedExports(config) {
|
|
|
9458
9458
|
}
|
|
9459
9459
|
if (inMultilineComment)
|
|
9460
9460
|
continue;
|
|
9461
|
+
const backtickCount = (line.match(/`/g) || []).length;
|
|
9462
|
+
if (backtickCount % 2 !== 0) {
|
|
9463
|
+
inTemplateLiteral = !inTemplateLiteral;
|
|
9464
|
+
}
|
|
9465
|
+
if (inTemplateLiteral)
|
|
9466
|
+
continue;
|
|
9461
9467
|
if (trimmed.startsWith("//"))
|
|
9462
9468
|
continue;
|
|
9463
9469
|
if (trimmed.includes("{/*") || trimmed.includes("*/}"))
|