davidrios / pug-tmbundle

A comprehensive textmate / sublime text bundle for the Pug (formerly Jade) template language.
https://github.com/davidrios/pug-tmbundle
MIT License
48 stars 20 forks source link

Colon-prefixed attribute that is not the first attribute does not get correct scope #32

Closed alexr00 closed 1 year ago

alexr00 commented 5 years ago

From @pqvst in https://github.com/microsoft/vscode/issues/76373

A colon-prefixed attribute that is not the first attribute does not get the correct scope (whereas @-prefixed does). Colon-prefixed attributes are shorthand notation for Vue.js property binding.

Expected scope, from :foo on line 6:

entity.other.attribute-name.tag.pug
meta.tag.other
text.pug

Unexpected scope, from :bar on line 5:

variable.other.readwrite.js
attribute_value
meta.tag.other
text.pug

image

body
  .foo(foo="foo" bar="bar")

  .foo(foo="foo" v-bind:bar="bar")
  .foo(foo="foo" :bar="bar")
  .foo(:foo="foo" bar="bar")

  .foo(foo="foo" :[bar]="bar")
  .foo(:[foo]="foo" bar="bar")

  .foo(foo="foo" v-on:bar="bar")
  .foo(foo="foo" @bar="bar")
  .foo(@foo="foo" bar="bar")

  .foo(foo="foo" @[bar]="bar")
  .foo(@[foo]="foo" bar="bar")

(It seems github syntax highlighting has the same issue)

lopugit commented 3 years ago

still :/

lopugit commented 3 years ago

I'm gonna have to start contributing to pug stuff