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

Incorrect Unnecessary 'div' tag error #185

Open
shadowgate15 opened this issue Dec 15, 2021 · 1 comment
Open

Incorrect Unnecessary 'div' tag error #185

shadowgate15 opened this issue Dec 15, 2021 · 1 comment

Comments

@shadowgate15
Copy link

  • pug-lint version: 2.6.0
  • OS: MacOS Monterey 12.0.1

Currently the following line will fail with an Unnecessary 'div' tag error.

div(data-type="text").class

If it were written as (data-type="text").class, pug will fail to render and throw an error.

Test

it('should not report necessary div tags with classes after attributes', function () {
  assert.equal(linter.checkString('div(data-type="text").class').length, 0);
});
@lazarljubenovic
Copy link

Isn't this equivalent to .class(data-type="text")?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants