Fix formatting of "angularControlFlowBlock" in span (#15615)

This commit is contained in:
fisker Cheung authored and GitHub committed 2023-11-12 22:36:43 +08:00
1 parent bb68fec819
commit c433415d42
3 files changed
+28 -2

No files matched your search

+2 -2
View File
@@ -145,7 +145,7 @@ function isLeadingSpaceSensitiveNode(node, options) {
return isLeadingSpaceSensitive;
function _isLeadingSpaceSensitiveNode() {
if (isFrontMatter(node)) {
if (isFrontMatter(node) || node.type === "angularControlFlowBlock") {
return false;
}
@@ -188,7 +188,7 @@ function isLeadingSpaceSensitiveNode(node, options) {
}
function isTrailingSpaceSensitiveNode(node, options) {
if (isFrontMatter(node)) {
if (isFrontMatter(node) || node.type === "angularControlFlowBlock") {
return false;
}
@@ -53,6 +53,30 @@ printWidth: 80
================================================================================
`;
exports[`chid.html format 1`] = `
====================================options=====================================
parsers: ["angular"]
printWidth: 80
| printWidth
=====================================input======================================
<span>@if (test) {text}</span>
<div>@if (test) {text}</div>
=====================================output=====================================
<span>
@if (test) {
text
}
</span>
<div>
@if (test) {
text
}
</div>
================================================================================
`;
exports[`defer.html format 1`] = `
====================================options=====================================
parsers: ["angular"]
@@ -0,0 +1,2 @@
<span>@if (test) {text}</span>
<div>@if (test) {text}</div>