Skip to content

Commit e551fd0

Browse files
author
Robert Jackson
authored
Merge pull request #181 from Turbo87/whitespace
Add support for templates containing `~` (whitespace control)
2 parents 039fa23 + afd6bea commit e551fd0

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

transforms/angle-brackets/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ test('tilde', () => {
725725
expect(runTest('tilde.hbs', input)).toMatchInlineSnapshot(`
726726
"
727727
{{#if foo~}}
728-
{{some-component}}
728+
<SomeComponent />
729729
{{/if}}
730730
"
731731
`);

transforms/angle-brackets/transform.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@ function transformNestedSubExpression(subExpression) {
9090
function shouldSkipFile(fileInfo, config) {
9191
let source = fileInfo.source;
9292

93-
if (source.includes('~')) {
94-
//skip files with `~` until https://github.com/ember-codemods/ember-angle-brackets-codemod/issues/46 is resolved
95-
logger.warn(
96-
`WARNING: ${fileInfo.path} was not converted as it contains a "~" (https://github.com/ember-codemods/ember-angle-brackets-codemod/issues/46)`
97-
);
98-
return true;
99-
}
100-
10193
if (config.skipFilesThatMatchRegex && config.skipFilesThatMatchRegex.test(source)) {
10294
logger.warn(
10395
`WARNING: ${fileInfo.path} was not skipped as its content matches the "skipFilesThatMatchRegex" config setting: ${config.skipFilesThatMatchRegex}`

0 commit comments

Comments
 (0)