Add label to links

This commit is contained in:
Clément Pons 2025-10-07 11:46:01 +02:00
parent 02d116c893
commit 8e7ad4fd09
3 changed files with 8 additions and 3 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -18,18 +18,18 @@
"license": "GPL-3.0",
"dependencies": {
"lodash.capitalize": "^4.2.1",
"mdast-util-find-and-replace": "^3.0.1",
"mdast-util-find-and-replace": "^3.0.2",
"unist-util-visit": "^4.1.2"
},
"devDependencies": {
"@types/lodash.capitalize": "^4.2.9",
"@types/unist": "^2.0.10",
"@types/unist": "^2.0.11",
"mdast-util-to-string": "^4.0.0",
"rehype-raw": "^6.1.1",
"rehype-stringify": "^9.0.4",
"remark-parse": "^10.0.2",
"remark-rehype": "^10.1.0",
"typescript": "^5.5.4",
"typescript": "^5.8.3",
"unified": "^10.1.2"
}
}

View File

@ -171,6 +171,11 @@ export default function ofm() {
return {
type: "link",
url,
data: {
hProperties: {
label: alias ?? fp,
}
},
children: [
{
type: "text",