johansatge/obsidian-automatic-table-of-contents

💥 Could not render table of contents (Invalid regular expression: /[[/gs: Unterminated character class)

Opened this issue · 5 comments

Greetings,
Ever since the most recent update, whenever I try to generate a simple automatic table of contents, I get this message :
💥 Could not render table of contents (Invalid regular expression: /[[/gs: Unterminated character class)

image

Here is the code I am using :
image

I am using Win 10, Obsidian 1.5.3. Here are the other plugins I use :

Automatic Table of Contents

cMenu

Colored Tags

Commander

Dataview

Homepage

Iconize

Linter

Metadata menu

Multi column markdown

Omnisearch

Pretty bibtex

Recent files

Ribbon divider

Smart typography

Sort and permute lines

Tag wrangler

Text extractor

Zotero Integration

I've been able to reproduce this bug by opening my other (test) vault. The Table of contents also worked in it. But as soon as I updated the plug in the same error message started appearing.

Hi! thx for the report.

Could you please paste the full markdown of a failing page?

Here is the markdown text of a page where it fails (the table of content fails on all pages, so I opted to copy-paste a short one for convenience) :


date created: 2024-01-09
date modified: 2024-02-10
type:

  • personal-research

#RecordsManagement

Table of contents

AAQ - Comment gérer vos DOCUMENTS PERSONNELS Supports et témoins de la vie quotidienne

https://archivistes.qc.ca/produit/comment-gerer-vos-documents-personnels-all/

Johnny Decimal

https://johnnydecimal.com/

image

Thanks! I can't reproduce, so I suspect there is a conflict with one of your plugins.

One thing I can suggest is enabling debug by adding debugInConsole: true to the table-of-contents block, and check the output in the dev tools (View > Open Toggle Developer Tools); there could be useful information there (you might need to close/reopen the document to see the debug output)

CleanShot 2024-02-22 at 20 39 32@2x

I am not sure if I am looking in the right place, but I have this warning (but it may be regarding the other tab : HOMEPAGE)

image


By turning all plug-ins off and on again, I have pinpointed the issue : It seems this plug in, when enabled, causes an error with Automatic Table of Content - https://github.com/sandrofigo/obsidian-pretty-bibtex