Skip to content

Wrong indentation for custom elements without hyphens #98

Description

@dnd

I'm experiencing incorrect indentation when a custom element does not contain a hyphen. It is nesting the child content even with the tag.

<div>
  |  <!-- correct indent -->
</div>

<w-hatever>
  |  <!-- correct indent -->
</w-hatever>

<Cust-om>
  |  <!-- correct indent -->
</Cust-om>

<whatever>
|  <!-- incorrect indent -->
</whatever>

<Custom>
|  <!-- incorrect indent -->
</Custom>

I know that technically single word element names are not to spec, but they are very common now in frameworks such as Vue, and it would be nice if the html5.vim plugin just nested any element correctly regardless of name. Vue in particular specifies pascal cased names rather than kebab-cased in its default linting rules.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions