prettier-plugin-bootstrap 0.1.2 → 0.1.3
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 +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -327,8 +327,14 @@ function processHtmlAst(ast, targetAttrs) {
|
|
|
327
327
|
if (node.attributes && Array.isArray(node.attributes)) for (const attr of node.attributes) {
|
|
328
328
|
const name = attr.name || attr.key && attr.key.value;
|
|
329
329
|
if (targetAttrs.includes(name) && attr.value) {
|
|
330
|
-
if (typeof attr.value === "string")
|
|
331
|
-
|
|
330
|
+
if (typeof attr.value === "string") {
|
|
331
|
+
if (attr.kind && attr.kind !== "quoted") continue;
|
|
332
|
+
if (attr.value.includes("${")) continue;
|
|
333
|
+
attr.value = sortClassString(attr.value);
|
|
334
|
+
} else if (attr.value && typeof attr.value.value === "string") {
|
|
335
|
+
if (attr.value.value.includes("${")) continue;
|
|
336
|
+
attr.value.value = sortClassString(attr.value.value);
|
|
337
|
+
}
|
|
332
338
|
}
|
|
333
339
|
}
|
|
334
340
|
});
|