prettier-plugin-astro
Advanced tools
Comparing version 0.12.1 to 0.12.2
@@ -87,2 +87,3 @@ import { parse } from '@astrojs/compiler/sync'; | ||
const dotReplace = 'ωP_'; | ||
const interrogationReplace = 'ΔP_'; | ||
function isInlineElement(path, opts, node) { | ||
@@ -593,2 +594,3 @@ return node && node.type === 'element' && !isBlockElement(node, opts) && !isPreTagContent(path); | ||
doc = doc.replaceAll(dotReplace, '.'); | ||
doc = doc.replaceAll(interrogationReplace, '?'); | ||
} | ||
@@ -720,8 +722,13 @@ return doc; | ||
} | ||
if (attr.name.includes('@')) { | ||
attr.name = attr.name.replaceAll('@', atSignReplace); | ||
if (attr.kind !== 'spread') { | ||
if (attr.name.includes('@')) { | ||
attr.name = attr.name.replaceAll('@', atSignReplace); | ||
} | ||
if (attr.name.includes('.')) { | ||
attr.name = attr.name.replaceAll('.', dotReplace); | ||
} | ||
if (attr.name.includes('?')) { | ||
attr.name = attr.name.replaceAll('?', interrogationReplace); | ||
} | ||
} | ||
if (attr.name.includes('.')) { | ||
attr.name = attr.name.replaceAll('.', dotReplace); | ||
} | ||
return attr; | ||
@@ -728,0 +735,0 @@ } |
{ | ||
"name": "prettier-plugin-astro", | ||
"version": "0.12.1", | ||
"version": "0.12.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "A Prettier Plugin for formatting Astro files", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104535
819