tangled
alpha
login
or
join now
vielle.dev
/
site-archive
0
fork
atom
[Archived] Archived WIP of vielle.dev
0
fork
atom
overview
issues
pulls
pipelines
Add missing break statements
vielle.dev
8 months ago
52464fb8
8d697bdf
verified
This commit was signed with the committer's
known signature
.
vielle.dev
SSH Key Fingerprint:
SHA256:/4bvxqoEh9iMdjAPgcgAgXKZZQTROL3ULiPt6nH9RSs=
+29
-26
1 changed file
expand all
collapse all
unified
split
rehype-custom-html.ts
+29
-26
rehype-custom-html.ts
···
126
126
127
127
case "p": {
128
128
if (node.children[0].type === "text") para(node.children[0], node);
129
129
-
130
129
forChild(node.children);
130
130
+
break;
131
131
}
132
132
133
133
case "pre": {
···
135
135
if (node.properties["tabindex"]) node.properties["tabindex"] = "-1";
136
136
}
137
137
138
138
-
case "ul": {
139
139
-
node.children.forEach((x) => {
140
140
-
if (x.type === "element" && x.tagName === "li") {
141
141
-
const contents = x.children.map((y) => {
142
142
-
if (
143
143
-
y.type === "element" &&
144
144
-
y.tagName === "input" &&
145
145
-
y.properties.type === "checkbox"
146
146
-
)
147
147
-
y.properties["aria-label"] = y.properties.checked
148
148
-
? "Checked checkbox"
149
149
-
: "Unchecked checkbox";
150
150
-
return y;
151
151
-
});
138
138
+
case "ul":
139
139
+
{
140
140
+
node.children.forEach((x) => {
141
141
+
if (x.type === "element" && x.tagName === "li") {
142
142
+
const contents = x.children.map((y) => {
143
143
+
if (
144
144
+
y.type === "element" &&
145
145
+
y.tagName === "input" &&
146
146
+
y.properties.type === "checkbox"
147
147
+
)
148
148
+
y.properties["aria-label"] = y.properties.checked
149
149
+
? "Checked checkbox"
150
150
+
: "Unchecked checkbox";
151
151
+
return y;
152
152
+
});
153
153
+
154
154
+
x.children = [
155
155
+
{
156
156
+
type: "element",
157
157
+
tagName: "label",
158
158
+
properties: {},
159
159
+
children: contents,
160
160
+
},
161
161
+
];
162
162
+
}
163
163
+
});
164
164
+
}
152
165
153
153
-
x.children = [
154
154
-
{
155
155
-
type: "element",
156
156
-
tagName: "label",
157
157
-
properties: {},
158
158
-
children: contents,
159
159
-
},
160
160
-
];
161
161
-
}
162
162
-
});
163
163
-
}
166
166
+
break;
164
167
}
165
168
}
166
169
};