Skip to content

Commit 4b1fcbb

Browse files
committed
style: フォーマッター適用
1 parent 91f0de1 commit 4b1fcbb

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

packages/parser/src/parser/rules/inline/utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ export function parseInlineUntil(ctx: ParseContext, endType: TokenType): InlineP
132132
if (isBlockStart && nodes.length > 0) {
133133
const nextPos = pos + lookAhead;
134134
const shouldPreserve = ctx.blockRules.some(
135-
(rule) =>
136-
rule.preservesPrecedingLineBreak &&
137-
rule.isStartPattern?.(ctx, nextPos),
135+
(rule) => rule.preservesPrecedingLineBreak && rule.isStartPattern?.(ctx, nextPos),
138136
);
139137
if (shouldPreserve) {
140138
const lb: any = { element: "line-break" };

tests/integration/fixture-render.test.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ function normalizeHtml(html: string): string {
7777
// 連続する空白・改行を単一スペースに(HTML的に等価)
7878
.replace(/\s+/g, " ")
7979
// 属性順序を正規化(HTML的に等価)
80-
.replace(/<(\w+)((?:\s+[a-zA-Z_][\w-]*(?:="[^"]*")?)+)\s*(\/?)>/g, (_match, tag, attrStr, selfClose) => {
81-
const attrs = attrStr.trim().match(/[a-zA-Z_][\w-]*(?:="[^"]*")?/g) || [];
82-
attrs.sort();
83-
return `<${tag} ${attrs.join(" ")}${selfClose ? " /" : ""}>`;
84-
})
80+
.replace(
81+
/<(\w+)((?:\s+[a-zA-Z_][\w-]*(?:="[^"]*")?)+)\s*(\/?)>/g,
82+
(_match, tag, attrStr, selfClose) => {
83+
const attrs = attrStr.trim().match(/[a-zA-Z_][\w-]*(?:="[^"]*")?/g) || [];
84+
attrs.sort();
85+
return `<${tag} ${attrs.join(" ")}${selfClose ? " /" : ""}>`;
86+
},
87+
)
8588
// タグ間の空白を削除
8689
.replace(/>\s+</g, "><")
8790
// <br />前後の空白を削除(HTML的に等価)

0 commit comments

Comments
 (0)