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

Remove whitespace between HTML tags #37

Closed
chenjiahan opened this issue Jan 7, 2019 · 2 comments
Closed

Remove whitespace between HTML tags #37

chenjiahan opened this issue Jan 7, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@chenjiahan
Copy link
Contributor

Currently the preset will preserve whitespaces between HTML tags by default, can you provide a option like preserveWhitespace in vue-loader, or just remove whitespace between HTML tags like JSX in React?

input:

<div>
  <span>{this.text}</span>
  <span>{this.text}</span>
</div>

output:

h('div', [
  h('span', [this.text]),
  '\n        ',
  h('span', [this.text])
]);

expected:

h('div', [
  h('span', [this.text]),
  h('span', [this.text])
]);
@nickmessing nickmessing added the bug Something isn't working label Jan 7, 2019
@nickmessing
Copy link
Member

Sure, we should replicate React JSX Transform's way of handling whitespaces...

@chenjiahan
Copy link
Contributor Author

😆Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants