Automatically unfold details

This commit is contained in:
√(noham)² committed 2026-06-20 17:59:24 +02:00
1 parent 5ce76ffea6
commit 9fba22ca6c
1 file changed
+1
+1
View File
@@ -34,6 +34,7 @@ export function enhanceHtml (html, customCss, highlightStyle = 'github') {
'</head>', '</head>',
`${highlightCss(highlightStyle)}${HIGHLIGHT_JS}</head>` `${highlightCss(highlightStyle)}${HIGHLIGHT_JS}</head>`
) )
enhanced = enhanced.replace(/<details(?![^>]*?\bopen\b)/g, '<details open')
if (customCss !== null) { if (customCss !== null) {
enhanced = enhanced.replace( enhanced = enhanced.replace(
'</head>', '</head>',