Commit 749cb00f7c

749cb00f7c58f406c18ac9ed9853cf910f06bf37

parent: 7759b99843

Unregistered key

taskylizard <75871323+taskylizard@users.noreply.github.com> · 2025-08-19 13:59 UTC

feat: attrs plugin

Layout: unified · split

docs/.vitepress/configs/markdown/index.ts +2
@@ -10,6 +10,7 @@ import { imgSize } from '@mdit/plugin-img-size'
1010import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
1111import { emojiRender } from './emoji'
1212import { getTooltip } from '../../utils/tooltips'
13import { attrs } from '@mdit/plugin-attrs'
1314
1415export function configureMarkdown(md: MarkdownRenderer) {
1516 md.use(emojiRender)
@@ -26,6 +27,7 @@ export function configureMarkdown(md: MarkdownRenderer) {
2627 multibody: true,
2728 aotolabel: true
2829 })
30 md.use(attrs)
2931 renderTooltip(md)
3032 renderInlineTooltip(md)
3133}
package.json +2
@@ -20,6 +20,7 @@
2020 "dependencies": {
2121 "@fmhy/components": "^0.0.3",
2222 "@mdit/plugin-align": "^0.13.1",
23 "@mdit/plugin-attrs": "^0.23.1",
2324 "@mdit/plugin-figure": "^0.13.1",
2425 "@mdit/plugin-img-lazyload": "^0.13.1",
2526 "@mdit/plugin-img-size": "^0.13.1",
@@ -37,6 +38,7 @@
3738 "medium-zoom": "^1.1.0",
3839 "nitro-cors": "^0.7.1",
3940 "nitropack": "^2.10.4",
41 "pathe": "^2.0.3",
4042 "tinyexec": "^0.3.1",
4143 "ufo": "^1.5.4",
4244 "unocss": "0.59.0-beta.1",
pnpm-lock.yaml +45 −3
@@ -14,6 +14,9 @@ importers:
1414 '@mdit/plugin-align':
1515 specifier: ^0.13.1
1616 version: 0.13.1(markdown-it@14.1.0)
17 '@mdit/plugin-attrs':
18 specifier: ^0.23.1
19 version: 0.23.1(markdown-it@14.1.0)
1720 '@mdit/plugin-figure':
1821 specifier: ^0.13.1
1922 version: 0.13.1(markdown-it@14.1.0)
@@ -65,6 +68,9 @@ importers:
6568 nitropack:
6669 specifier: ^2.10.4
6770 version: 2.10.4(typescript@5.6.3)(webpack-sources@3.2.3)
71 pathe:
72 specifier: ^2.0.3
73 version: 2.0.3
6874 tinyexec:
6975 specifier: ^0.3.1
7076 version: 0.3.1
@@ -1245,6 +1251,15 @@ packages:
12451251 resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==}
12461252 hasBin: true
12471253
1254 '@mdit/helper@0.22.1':
1255 resolution: {integrity: sha512-lDpajcdAk84aYCNAM/Mi3djw38DJq7ocLw5VOSMu/u2YKX3/OD37a6Qb59in8Uyp4SiAbQoSHa8px6hgHEpB5g==}
1256 engines: {node: '>= 18'}
1257 peerDependencies:
1258 markdown-it: ^14.1.0
1259 peerDependenciesMeta:
1260 markdown-it:
1261 optional: true
1262
12481263 '@mdit/plugin-align@0.13.1':
12491264 resolution: {integrity: sha512-g8je53oEpYNHEudhtB5ViSiAaiMcca+hvoGbInhLl979tWuvEosOs0oWH2X3GM4f6goTGx8gLwzA10Z5C4FxIQ==}
12501265 engines: {node: '>= 18'}
@@ -1254,6 +1269,15 @@ packages:
12541269 markdown-it:
12551270 optional: true
12561271
1272 '@mdit/plugin-attrs@0.23.1':
1273 resolution: {integrity: sha512-KY05v0DIBMItOxoniyDxxtyYIiT+0JTQ2Ke0mzyCyvPplqCv4Avus7/uAZ3+IGcaI2oOTlYEHdU288VBFgXjAw==}
1274 engines: {node: '>= 18'}
1275 peerDependencies:
1276 markdown-it: ^14.1.0
1277 peerDependenciesMeta:
1278 markdown-it:
1279 optional: true
1280
12571281 '@mdit/plugin-container@0.13.1':
12581282 resolution: {integrity: sha512-mFfm7YViyLHo8uORVa9oLi9+acZZoSVdPf3WPqzC/yLZAJbF27rfJgWZ9Kylt+tyaAYng8L4DiSeVcSNUIHF1A==}
12591283 engines: {node: '>= 18'}
@@ -3408,6 +3432,9 @@ packages:
34083432 pathe@1.1.2:
34093433 resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
34103434
3435 pathe@2.0.3:
3436 resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}
3437
34113438 perfect-debounce@1.0.0:
34123439 resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
34133440
@@ -5149,6 +5176,12 @@ snapshots:
51495176 - encoding
51505177 - supports-color
51515178
5179 '@mdit/helper@0.22.1(markdown-it@14.1.0)':
5180 dependencies:
5181 '@types/markdown-it': 14.1.2
5182 optionalDependencies:
5183 markdown-it: 14.1.0
5184
51525185 '@mdit/plugin-align@0.13.1(markdown-it@14.1.0)':
51535186 dependencies:
51545187 '@mdit/plugin-container': 0.13.1(markdown-it@14.1.0)
@@ -5156,6 +5189,13 @@ snapshots:
51565189 optionalDependencies:
51575190 markdown-it: 14.1.0
51585191
5192 '@mdit/plugin-attrs@0.23.1(markdown-it@14.1.0)':
5193 dependencies:
5194 '@mdit/helper': 0.22.1(markdown-it@14.1.0)
5195 '@types/markdown-it': 14.1.2
5196 optionalDependencies:
5197 markdown-it: 14.1.0
5198
51595199 '@mdit/plugin-container@0.13.1(markdown-it@14.1.0)':
51605200 dependencies:
51615201 '@types/markdown-it': 14.1.2
@@ -6241,7 +6281,7 @@ snapshots:
62416281 giget: 1.2.3
62426282 jiti: 2.4.0
62436283 mlly: 1.7.2
6244 ohash: 1.1.4
6284 ohash: 1.1.6
62456285 pathe: 1.1.2
62466286 perfect-debounce: 1.0.0
62476287 pkg-types: 1.2.1
@@ -6753,7 +6793,7 @@ snapshots:
67536793 defu: 6.1.4
67546794 node-fetch-native: 1.6.4
67556795 nypm: 0.3.8
6756 ohash: 1.1.4
6796 ohash: 1.1.6
67576797 pathe: 1.1.2
67586798 tar: 6.2.1
67596799
@@ -6832,7 +6872,7 @@ snapshots:
68326872 defu: 6.1.4
68336873 destr: 2.0.3
68346874 iron-webcrypto: 1.2.1
6835 ohash: 1.1.4
6875 ohash: 1.1.6
68366876 radix3: 1.1.2
68376877 ufo: 1.5.4
68386878 uncrypto: 0.1.3
@@ -7603,6 +7643,8 @@ snapshots:
76037643
76047644 pathe@1.1.2: {}
76057645
7646 pathe@2.0.3: {}
7647
76067648 perfect-debounce@1.0.0: {}
76077649
76087650 picocolors@1.1.1: {}