@marko/language-tools 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3516,7 +3516,15 @@ var HTMLExtractor = class {
|
|
|
3516
3516
|
}
|
|
3517
3517
|
#writeAttrNamed(attr) {
|
|
3518
3518
|
this.#extractor.write(" ");
|
|
3519
|
-
this.#
|
|
3519
|
+
const nameString = this.#read(attr.name);
|
|
3520
|
+
if (/:(?:scoped|(?:no-update(?:-if)?))$/.test(nameString)) {
|
|
3521
|
+
this.#extractor.copy({
|
|
3522
|
+
start: attr.name.start,
|
|
3523
|
+
end: attr.name.start + nameString.lastIndexOf(":")
|
|
3524
|
+
});
|
|
3525
|
+
} else {
|
|
3526
|
+
this.#extractor.copy(attr.name);
|
|
3527
|
+
}
|
|
3520
3528
|
if (attr.value === void 0 || attr.name.start === attr.name.end || attr.value.type === 14 /* AttrMethod */) {
|
|
3521
3529
|
return;
|
|
3522
3530
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3484,7 +3484,15 @@ var HTMLExtractor = class {
|
|
|
3484
3484
|
}
|
|
3485
3485
|
#writeAttrNamed(attr) {
|
|
3486
3486
|
this.#extractor.write(" ");
|
|
3487
|
-
this.#
|
|
3487
|
+
const nameString = this.#read(attr.name);
|
|
3488
|
+
if (/:(?:scoped|(?:no-update(?:-if)?))$/.test(nameString)) {
|
|
3489
|
+
this.#extractor.copy({
|
|
3490
|
+
start: attr.name.start,
|
|
3491
|
+
end: attr.name.start + nameString.lastIndexOf(":")
|
|
3492
|
+
});
|
|
3493
|
+
} else {
|
|
3494
|
+
this.#extractor.copy(attr.name);
|
|
3495
|
+
}
|
|
3488
3496
|
if (attr.value === void 0 || attr.name.start === attr.name.end || attr.value.type === 14 /* AttrMethod */) {
|
|
3489
3497
|
return;
|
|
3490
3498
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marko/language-tools",
|
|
3
3
|
"description": "Marko Language Tools",
|
|
4
|
-
"version": "2.3.
|
|
4
|
+
"version": "2.3.1",
|
|
5
5
|
"bugs": "https://github.com/marko-js/language-server/issues/new?template=Bug_report.md",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@marko/compiler": "^5.28.4"
|