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

feat!: set whitespace: 'condense' for template compiler #3853

Merged
merged 1 commit into from
Apr 22, 2019

Conversation

haoqunjiang
Copy link
Member

@haoqunjiang haoqunjiang commented Apr 19, 2019

BREAKING CHANGE:
Detailed explanation: vuejs/vue#9208 (comment)

Take the following template as example:

<p>
  Welcome to <b>Vue.js</b> <i>world</i>.
  Have fun!
</p>

With preserveWhitespace: false, it was compiled as:

<p> Welcome to <b>Vue.js</b><i>world</i>. Have fun! </p>

With whitespace: 'condense', it is now compiled as:

<p> Welcome to <b>Vue.js</b> <i>world</i>. Have fun! </p>

Note the inline whitespace between tags is preserved.

Closes #1020

BREAKING CHANGE:
Detailed explanation: vuejs/vue#9208 (comment)

Take the following template as example:
```
<p>
  Welcome to <b>Vue.js</b> <i>world</i>.
  Have fun!
</p>
```

With `preserveWhitespace: false`, it was compiled as:
```
<p> Welcome to <b>Vue.js</b><i>world</i>. Have fun! </p>
```

With `whitespace: 'condense'`, it is now compiled as:
```
<p> Welcome to <b>Vue.js</b> <i>world</i>. Have fun! </p>
```

Note the **inline whitespace between tags** is preserved.
@haoqunjiang haoqunjiang mentioned this pull request Apr 22, 2019
19 tasks
@haoqunjiang haoqunjiang merged commit dc2b85c into vuejs:next-major Apr 22, 2019
haoqunjiang added a commit that referenced this pull request Apr 30, 2019
BREAKING CHANGE:
Detailed explanation: vuejs/vue#9208 (comment)

Take the following template as example:
```
<p>
  Welcome to <b>Vue.js</b> <i>world</i>.
  Have fun!
</p>
```

With `preserveWhitespace: false`, it was compiled as:
```
<p> Welcome to <b>Vue.js</b><i>world</i>. Have fun! </p>
```

With `whitespace: 'condense'`, it is now compiled as:
```
<p> Welcome to <b>Vue.js</b> <i>world</i>. Have fun! </p>
```

Note the **inline whitespace between tags** is preserved.

Closes #1020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant