Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for templates containing ~ (whitespace control) #181

Merged
merged 1 commit into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion transforms/angle-brackets/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ test('tilde', () => {
expect(runTest('tilde.hbs', input)).toMatchInlineSnapshot(`
"
{{#if foo~}}
{{some-component}}
<SomeComponent />
{{/if}}
"
`);
Expand Down
8 changes: 0 additions & 8 deletions transforms/angle-brackets/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ function transformNestedSubExpression(subExpression) {
function shouldSkipFile(fileInfo, config) {
let source = fileInfo.source;

if (source.includes('~')) {
//skip files with `~` until https://github.com/ember-codemods/ember-angle-brackets-codemod/issues/46 is resolved
logger.warn(
`WARNING: ${fileInfo.path} was not converted as it contains a "~" (https://github.com/ember-codemods/ember-angle-brackets-codemod/issues/46)`
);
return true;
}

if (config.skipFilesThatMatchRegex && config.skipFilesThatMatchRegex.test(source)) {
logger.warn(
`WARNING: ${fileInfo.path} was not skipped as its content matches the "skipFilesThatMatchRegex" config setting: ${config.skipFilesThatMatchRegex}`
Expand Down