From f56ed1fc5a219a76c6f6fb92f3bc40898fb4c62d Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Mon, 25 Nov 2024 10:03:42 -0700 Subject: [PATCH] Fix code-block directive --- www/src/pages/docs/cli/lint.md | 10 ++++++++-- www/src/plugins/remark-vitepress.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/www/src/pages/docs/cli/lint.md b/www/src/pages/docs/cli/lint.md index 259c2586..22bbd374 100644 --- a/www/src/pages/docs/cli/lint.md +++ b/www/src/pages/docs/cli/lint.md @@ -122,10 +122,16 @@ export default defineConfig({ { matches: [ // example 1: require all color.base tokens to be a ramp with 100–900 values - { match: ["color.base.*"], requiredTokens: ["100", "200", "300", "400", "500", "600", "700", "800", "900"] }, + { + match: ["color.base.*"], + requiredTokens: ["100", "200", "300", "400", "500", "600", "700", "800", "900"], + }, // example 2: require all text.* and bg.* tokens to have specific states - { match: ["text.*", "bg.*"], requiredGroups: ["action", "disabled", "error", "warn", "success"] }, + { + match: ["text.*", "bg.*"], + requiredGroups: ["action", "disabled", "error", "warn", "success"], + }, ], }, ], diff --git a/www/src/plugins/remark-vitepress.js b/www/src/plugins/remark-vitepress.js index 7f4047c3..5539dc9f 100644 --- a/www/src/plugins/remark-vitepress.js +++ b/www/src/plugins/remark-vitepress.js @@ -73,7 +73,7 @@ export default function remarkVitepress() { ) .join('')}`, }, - ...children.map((node, i) => ({ + ...codeBlocks.map((node, i) => ({ type: 'paragraph', data: { hName: 'div',