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