diff --git a/src/core/event/sidebar.js b/src/core/event/sidebar.js index c142529ef..aba0b2a00 100644 --- a/src/core/event/sidebar.js +++ b/src/core/event/sidebar.js @@ -37,10 +37,11 @@ export function collapse(el) { dom.on(el, 'click', ({ target }) => { if ( - target.nodeName === 'A' && + (target.nodeName === 'A' || target.nodeName === 'P') && target.nextSibling && target.nextSibling.classList && - target.nextSibling.classList.contains('app-sub-sidebar') + (target.nextSibling.classList.contains('app-sidebar') || + target.nextSibling.classList.contains('app-sub-sidebar')) ) { dom.toggleClass(target.parentNode, 'collapse'); } diff --git a/src/core/render/compiler.js b/src/core/render/compiler.js index 38e33b9f0..768339b19 100644 --- a/src/core/render/compiler.js +++ b/src/core/render/compiler.js @@ -258,7 +258,9 @@ export class Compiler { let html = ''; if (text) { - html = this.compile(text); + html = this.compile(text) + .replaceAll('