Skip to content

Commit 99b7bc6

Browse files
committed
feature: @putout/plugin-apply-template-literals: exclude \n
1 parent 2b5274a commit 99b7bc6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/plugin-apply-template-literals/lib/apply-template-literals.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ module.exports.filter = ({parentPath}) => {
1616

1717
parentPath.traverse({
1818
StringLiteral(path) {
19-
if (path.node.value.includes('\r'))
19+
const {value} = path.node;
20+
21+
if (value.includes('\r'))
22+
is = false;
23+
24+
if (value.includes('\n'))
2025
is = false;
2126
},
2227
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
process.stdout.write('\r' + percent + '%');
2+
throw new Error('Could not get published versions\n' + err);

0 commit comments

Comments
 (0)