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

Ignore expressions in handlebars tags. #1040

Closed
rickysullivan opened this issue Oct 7, 2016 · 0 comments
Closed

Ignore expressions in handlebars tags. #1040

rickysullivan opened this issue Oct 7, 2016 · 0 comments

Comments

@rickysullivan
Copy link

rickysullivan commented Oct 7, 2016

Although this is custom handlebars (Mandrill) markup. Is there a way I can prevent the expression inside the back ticks from being formatted?

Input

The code looked like this before beautification:

{{#if `this.customerSegment == "Active"`}}
    ...
{{/if}}

Expected Output

The code should have looked like this after beautification:

{{#if `this.customerSegment == "Active"`}}
    ...
{{/if}}

Actual Output

The code actually looked like this after beautification:

{{#if `this.customerSegment=="Active" `}}
    ...
{{/if}}

Environment

atom-beautify with JS Beautifier set as the beautifier for Handlebars.

Settings

{
"html": {
        "allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust", "hbs"],
        "brace_style": "collapse",
        "end_with_newline": true,
        "indent_char": " ",
        "indent_handlebars": true,
        "indent_inner_html": true,
        "indent_scripts": "normal",
        "indent_size": 2,
        "max_preserve_newlines": 1,
        "preserve_newlines": true,
        "unformatted": ["a", "span", "img", "code", "pre", "sub", "sup", "em", "strong", "b", "i", "u", "strike", "big", "small", "pre", "h1", "h2", "h3", "h4", "h5", "h6", "meta"],
        "wrap_line_length": 0
    }
}
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