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

HTML "select" tags have too much indentation #1097

Closed
knocte opened this issue Jan 3, 2017 · 5 comments
Closed

HTML "select" tags have too much indentation #1097

knocte opened this issue Jan 3, 2017 · 5 comments

Comments

@knocte
Copy link

knocte commented Jan 3, 2017

HTML "select" tags have too much indentation.

Input

The code looked like this before beautification:

<select class="col-4 form-input" ng-model="info.dateRange" ng-init="info.dateRange = 'last24'">
        <option selected="selected" value="last24">{{"dashboard_records_text_7" | translate}}</option>
        <option value="last7">{{"dashboard_records_text_8" | translate}}</option>
        <option value="custom">{{"dashboard_records_text_9" | translate}}</option>
    </select>

Expected Output

The code should have looked like this after beautification:

<select class="col-4 form-input" ng-model="info.dateRange" ng-init="info.dateRange = 'last24'">
    <option selected="selected" value="last24">{{"dashboard_records_text_7" | translate}}</option>
    <option value="last7">{{"dashboard_records_text_8" | translate}}</option>
    <option value="custom">{{"dashboard_records_text_9" | translate}}</option>
</select>

Actual Output

The code actually looked like this after beautification:

<select class="col-4 form-input" ng-model="info.dateRange" ng-init="info.dateRange = 'last24'">
        <option selected="selected" value="last24">{{"dashboard_records_text_7" | translate}}</option>
        <option value="last7">{{"dashboard_records_text_8" | translate}}</option>
        <option value="custom">{{"dashboard_records_text_9" | translate}}</option>
    </select>

Environment

OS: Mac
Version tested with: 1.6.7

Settings

Example:

var options = {
    "wrap_line_length": 80,
    "indent_handlebars": true
};
@bitwiseman bitwiseman added this to the v1.7.x milestone Jan 4, 2017
@HookyQR
Copy link
Contributor

HookyQR commented Feb 10, 2017

select is an unformatted tag by default. This isn't a bug. Add the following to your options:

	"unformatted": ["a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "data",
		"datalist", "del", "dfn", "em", "embed", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "map",
		"mark", "math", "meter", "noscript", "object", "output", "progress", "q", "ruby", "s", "samp", "small", "span",
		"strong", "sub", "sup", "svg", "template", "textarea", "time", "u", "var", "video", "wbr", "text", "acronym",
		"address", "big", "dt", "ins", "strike", "tt"]

@Oxicode
Copy link

Oxicode commented Jul 4, 2017

+1

@bitwiseman
Copy link
Member

Fixed in 1.8.0-rc4 using the new inline setting.
@HookyQR
Unformatted no longer needed.

@HookyQR
Copy link
Contributor

HookyQR commented Aug 12, 2018

Any timeline for a 1.8.0 release. Would love to update the VS Code extension, but waiting for the -rc to drop off.

@bitwiseman
Copy link
Member

bitwiseman commented Aug 12, 2018 via email

@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

4 participants