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
Fix accessibility issue with custom markdown
vielle.dev
9 months ago
012421b8
7a36c5fc
verified
This commit was signed with the committer's
known signature
.
vielle.dev
SSH Key Fingerprint:
SHA256:/4bvxqoEh9iMdjAPgcgAgXKZZQTROL3ULiPt6nH9RSs=
+2
-1
1 changed file
expand all
collapse all
unified
split
rehype-custom-html.ts
+2
-1
rehype-custom-html.ts
···
54
55
// match section before |
56
const prefixes = alt.match(/.*?(?= \|.*)/gm);
0
0
57
node.properties.alt = alt.match(/(?<= \| ).*/gm);
58
-
if (!prefixes) return;
59
const flags = prefixes[0].split(" ");
60
for (const flag of flags) {
61
node.properties[`data-img-flag--${flag}`] = true;
···
54
55
// match section before |
56
const prefixes = alt.match(/.*?(?= \|.*)/gm);
57
+
if (!prefixes) return;
58
+
59
node.properties.alt = alt.match(/(?<= \| ).*/gm);
0
60
const flags = prefixes[0].split(" ");
61
for (const flag of flags) {
62
node.properties[`data-img-flag--${flag}`] = true;