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

Fix issue with windows line endings immediately after tag name #40

Merged
merged 2 commits into from
Aug 29, 2018
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 lib/ast-transform.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const reLines = /(.*?(?:\r\n?|\n|$))/gm;
const reLines = /(.*?(?:\n\r|\n|$))/gm;
const ALPHA = /[A-Za-z]/;
const WHITESPACE = /[\t\n\f ]/;

Expand Down
7 changes: 7 additions & 0 deletions tests/integration/components/angle-bracket-invocation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ module('Integration | Component | angle-bracket-invocation', function(hooks) {
assert.dom().hasText('hi martin!');
});

test('multiline component invocation using windows line endings without spaces after open element (GH#40)', async function(assert) {
this.owner.register('template:components/foo', hbs`hi martin!`);

await render(hbs`<Foo\r\n @blah="thing"\r\n></Foo>`);
assert.dom().hasText('hi martin!');
});

test('invoke without block', async function(assert) {
this.owner.register('template:components/foo-bar', hbs`hi martin!`);

Expand Down