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
54
55
55
// match section before |
56
56
const prefixes = alt.match(/.*?(?= \|.*)/gm);
57
57
+
if (!prefixes) return;
58
58
+
57
59
node.properties.alt = alt.match(/(?<= \| ).*/gm);
58
58
-
if (!prefixes) return;
59
60
const flags = prefixes[0].split(" ");
60
61
for (const flag of flags) {
61
62
node.properties[`data-img-flag--${flag}`] = true;