From b66712c0046ad6aeb1f3350742de32e4ceb2f9c6 Mon Sep 17 00:00:00 2001 From: solimant Date: Wed, 21 Feb 2024 13:28:08 +0000 Subject: [PATCH] Do not index HTML comments in titles --- gatsby-node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatsby-node.js b/gatsby-node.js index 8c6176df..bec853b1 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -781,7 +781,7 @@ const getTitle = (pages, slug, node) => { const firstLine = node?.rawMarkdownBody?.split("\n", 1)[0] title = firstLine?.replace(/#/g, "") } - return title + return title?.replace(//gs, "") } exports.sourceNodes = async ({