From 2ad38e3044063e60bdad98618997233b27383001 Mon Sep 17 00:00:00 2001 From: Andrew Cherniavskii Date: Thu, 5 Sep 2024 14:56:26 +0200 Subject: [PATCH] [docs-infra] Fix broken anchor button when header has a link (#43598) --- packages/markdown/parseMarkdown.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/markdown/parseMarkdown.js b/packages/markdown/parseMarkdown.js index caa98584c787a2..f13fcf239c365b 100644 --- a/packages/markdown/parseMarkdown.js +++ b/packages/markdown/parseMarkdown.js @@ -366,7 +366,13 @@ function createRender(context) { } return [ - `${headingHtml}`, + headingHtml.includes('${headingHtml}`, + ``, + ].join('') + : `${headingHtml}`, ``,