From b0cc177d844a6c7668244c105f834111a83d7dc8 Mon Sep 17 00:00:00 2001 From: zadam Date: Tue, 10 Jan 2023 15:06:21 +0100 Subject: [PATCH] make heading regex in TOC case insensitive --- src/public/app/widgets/toc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.js index 0c49d545f..bf4ac83e9 100644 --- a/src/public/app/widgets/toc.js +++ b/src/public/app/widgets/toc.js @@ -126,7 +126,7 @@ export default class TocWidget extends CollapsibleWidget { getToc(html) { // Regular expression for headings

...

using non-greedy // matching and backreferences - const headingTagsRegex = /]*>(.*?)<\/h\1>/g; + const headingTagsRegex = /]*>(.*?)<\/h\1>/gi; // Use jquery to build the table rather than html text, since it makes // it easier to set the onclick event that will be executed with the