diff --git a/website/siteConfig.js b/website/siteConfig.js index 5bcdf46f0..be50e8de5 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -47,7 +47,25 @@ const siteConfig = { algolia: { apiKey: process.env.ALGOLIA_PRETTIER_API_KEY, indexName: "prettier" - } + }, + markdownPlugins: [ + // ignore `` before passing into Docusaurus to avoid mis-parsing (#3322) + md => { + md.block.ruler.before( + "htmlblock", + "prettierignore", + (state, startLine) => { + const pos = state.bMarks[startLine]; + const max = state.eMarks[startLine]; + if (//.test(state.src.slice(pos, max))) { + state.line += 1; + return true; + } + return false; + } + ); + } + ] }; module.exports = siteConfig;