diff --git a/packages/website/plugins/generated-rule-docs.ts b/packages/website/plugins/generated-rule-docs.ts index 23ff08c54df1..f074db043551 100644 --- a/packages/website/plugins/generated-rule-docs.ts +++ b/packages/website/plugins/generated-rule-docs.ts @@ -18,18 +18,21 @@ const generatedRuleDocs: Plugin = () => { const parent = root as unist.Parent; // 1. Remove the " 🛑 This file is source code, not the primary documentation location! 🛑" - parent.children.splice(3, 1); + parent.children.splice( + parent.children.findIndex(v => v.type === 'blockquote'), + 1, + ); // 2. Add a description of the rule at the top of the file parent.children.unshift({ children: [ { - children: [ - { - type: 'text', - value: `${docs.description}.`, - }, - ], + children: docs.description + .split(/`(.+?)`/) + .map((value, index, array) => ({ + type: index % 2 === 0 ? 'text' : 'inlineCode', + value: index === array.length - 1 ? `${value}.` : value, + })), type: 'paragraph', }, ], pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy