From 31faad228fb0353b8e436c3696b676f52586d371 Mon Sep 17 00:00:00 2001 From: Julien Ripouteau Date: Sun, 31 Dec 2023 14:55:07 +0100 Subject: [PATCH] fix: toc not displaying Fix #45 --- app/services/markdown_renderer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/markdown_renderer.ts b/app/services/markdown_renderer.ts index 5c718f1..bb8cff8 100644 --- a/app/services/markdown_renderer.ts +++ b/app/services/markdown_renderer.ts @@ -40,6 +40,8 @@ export class MarkdownRenderer { allowedAttributes: { ...sanitizeHtml.default.defaults.allowedAttributes, '*': ['class', 'align'], + 'h1': ['id'], + 'h2': ['id'], }, allowedClasses: { '*': ['*'] }, })