Skip to content
New issue

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

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

Already on GitHub? # to your account

Event listener breaks on multi-line, tab indented element #97

Closed
riovir opened this issue Feb 25, 2020 · 2 comments
Closed

Event listener breaks on multi-line, tab indented element #97

riovir opened this issue Feb 25, 2020 · 2 comments
Labels
bug template engine Applies to built-in template engine

Comments

@riovir
Copy link

riovir commented Feb 25, 2020

Version

4.1.4

Reproduction

Modify /test/spec/html.js to use a multiline style, tab indented onclick listener, then run the tests.

describe('event attribute expression', () => {
  /* eslint-disable no-tabs */
  const render = (value) => html`<button
		onclick=${value}
  ></button><button onclick=${value}></button>`;
  /* eslint-enable no-tabs */
  const renderWithQuotes = (value) => html`<button onclick="${value}"></button>`;

(This issue is behind the odd line in this sandbox component pack.)

What is expected?

The tests to pass just as if I have been using space indentation.

What is actually happening?

The source code of the event handler gets inlined as an attribute in the rendered element.

@smalluban smalluban added bug template engine Applies to built-in template engine labels Feb 25, 2020
@smalluban
Copy link
Contributor

Fixed in v4.1.5. Thanks for creating an issue.

@riovir
Copy link
Author

riovir commented Feb 26, 2020 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug template engine Applies to built-in template engine
Development

No branches or pull requests

2 participants