@prettier/plugin-xml
Advanced tools
Comparing version 3.3.0 to 3.3.1
@@ -9,2 +9,8 @@ # Changelog | ||
## [3.3.1] - 2024-02-10 | ||
### Changed | ||
- Allow elements to be marked as whitespace ignored even when they have reference nodes. | ||
## [3.3.0] - 2024-02-09 | ||
@@ -259,3 +265,4 @@ | ||
[unreleased]: https://github.com/prettier/plugin-xml/compare/v3.3.0...HEAD | ||
[unreleased]: https://github.com/prettier/plugin-xml/compare/v3.3.1...HEAD | ||
[3.3.1]: https://github.com/prettier/plugin-xml/compare/v3.3.0...v3.3.1 | ||
[3.3.0]: https://github.com/prettier/plugin-xml/compare/v3.2.2...v3.3.0 | ||
@@ -262,0 +269,0 @@ [3.2.2]: https://github.com/prettier/plugin-xml/compare/v3.2.1...v3.2.2 |
{ | ||
"name": "@prettier/plugin-xml", | ||
"version": "3.3.0", | ||
"version": "3.3.1", | ||
"description": "prettier plugin for XML", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -54,5 +54,5 @@ import * as doc from "prettier/doc"; | ||
// If there are character data or reference nodes in the content, then we | ||
// can't ignore the whitespace. | ||
if (content.CData.length > 0 || content.reference.length > 0) { | ||
// If there are character data nodes in the content, then we can't ignore the | ||
// whitespace. | ||
if (content.CData.length > 0) { | ||
return false; | ||
@@ -346,2 +346,14 @@ } | ||
response = response.concat(path.map(printIToken, "PROCESSING_INSTRUCTION")); | ||
response = response.concat( | ||
path.map((referencePath) => { | ||
const referenceNode = referencePath.getValue(); | ||
return { | ||
offset: referenceNode.location.startOffset, | ||
printed: print(referencePath) | ||
}; | ||
}, "reference") | ||
); | ||
return response; | ||
@@ -348,0 +360,0 @@ } |
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
53085
1190