[Bug] Whitespace issue in HBS 2
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
### 🐞 Describe the Bug
Check the reproduction.
### 🔬 Minimal Reproduction
Component `foo`:
```hbs
{{#each (array 1 2) as |item index|~}}
{{~#if index}},{{/if}}{{yield item}}
{{~/each}}
```
Use it:
```hbs
(
{{#foo as |item|}}
{{~item~}}
{{/foo}}
)
```
This renders:
```html
( 1,2)
```
### 😕 Actual Behavior
Note the missing space before the closing parenthesis. There is a new line before the closing `span` tag so there should be a space.
Changing the usage to be something like:
```hbs
(
{{#foo as |item|}}
{{item}}
{{/foo}}
)
```
Fixes the issue. The space appears correctly.
### 🤔 Expected Behavior
A space to be there.
### 🌍 Environment
- Ember: 3.27.5
- Node.js/npm: 16.3
- OS: Linux
- Browser: Chrome
Contributor guide
Assessment
This issue has not been assessed yet.