Skip to content

Commit b48aeed

Browse files
committed
chore: 未使用変数を削除・使用するよう修正
1 parent b00e524 commit b48aeed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/parser/src/parser/rules/inline/link-triple.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,11 @@ export const linkTripleRule: InlineRule = {
108108

109109
// Special case: [[[*|label]]] means link to root "/" with label
110110
let finalTarget = trimmedTarget;
111-
let labelPrefix = "";
112111
if (trimmedTarget === "*" && foundPipe) {
113112
finalTarget = "";
114113
}
115114
// Special case: [[[*page]]] - * is a label prefix, page is the target
116115
if (trimmedTarget.startsWith("*") && !foundPipe) {
117-
labelPrefix = "*";
118116
finalTarget = trimmedTarget.slice(1);
119117
}
120118

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const VALID_SIZE_UNITS = ["px", "em", "rem", "ex", "%", "cm", "mm", "in", "pc"];
1616
*/
1717
function isValidSizeValue(size: string): boolean {
1818
// Match number + unit pattern
19-
const match = size.match(/^(\d+(?:\.\d+)?)(px|em|rem|ex|%|cm|mm|in|pc)$/i);
19+
const unitPattern = VALID_SIZE_UNITS.join("|");
20+
const match = size.match(new RegExp(`^(\\d+(?:\\.\\d+)?)(${unitPattern})$`, "i"));
2021
return match !== null;
2122
}
2223

0 commit comments

Comments
 (0)