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

Handlebars - if tags are broken when using helper with textarea #1482

Closed
astronomersiva opened this issue Aug 12, 2018 · 2 comments
Closed

Comments

@astronomersiva
Copy link

Description

Ran this on a legacy codebase and ran into this issue whenever textarea is used.

Input

The code looked like this before beautification:

{{textarea value=someContent}}

{{#if condition}}
  <div class="some-class">{{helper "hello"}}<strong>{{helper "world"}}</strong></div>
{{/if}}

Expected Output

The code should have looked like this after beautification:

{{textarea value=someContent}}

{{#if condition}}
  <div class="some-class">{{helper "hello"}}<strong>{{helper "world"}}</strong></div>
{{/if}}

Actual Output

The code actually looked like this after beautification:

{{textarea value=tweetContent}}

{{#if conditioncondition
<div class="some-class">{{helper "hello"}}<strong>{{helper "world"}}</strong></div>
{{/if}}

Steps to Reproduce

Environment

OS: macOS
js-beautify: rc5

Settings

Example:

js-beautify -r -s=2 --wrap_line_length=150 --type=html --indent_handlebars fileName
@bitwiseman
Copy link
Member

Fixing ASAP.

@bitwiseman
Copy link
Member

Fixed in and released in 1.8.0-rc6.

@bitwiseman bitwiseman modified the milestones: v1.8.x, 1.8.0-rc7 Aug 14, 2018
@bitwiseman bitwiseman modified the milestones: 1.8.0-rc8, 1.8.0 Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants