mirror of
https://github.com/NohamR/pdfy.git
synced 2026-10-11 02:39:58 +00:00
Automatically unfold details
This commit is contained in:
@@ -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>',
|
||||||
|
|||||||
Reference in New Issue
Block a user