mirror of
https://github.com/NohamR/pdfy.git
synced 2026-10-11 02:39:58 +00:00
Add configurable highlighting style
This commit is contained in:
@@ -37,7 +37,8 @@ export async function convert (url, options = {}) {
|
||||
css = null,
|
||||
prefs = {},
|
||||
output = null,
|
||||
browser: externalBrowser = null
|
||||
browser: externalBrowser = null,
|
||||
highlightStyle
|
||||
} = options
|
||||
|
||||
if (!VALID_THEMES.includes(theme)) {
|
||||
@@ -112,7 +113,7 @@ export async function convert (url, options = {}) {
|
||||
contentHtml = contentHtml.replace(/ loading="lazy"/g, '')
|
||||
await readerPage.close()
|
||||
|
||||
const enhancedHtml = enhanceHtml(contentHtml, css)
|
||||
const enhancedHtml = enhanceHtml(contentHtml, css, highlightStyle)
|
||||
|
||||
const pdfPage = await browser.newPage()
|
||||
await pdfPage.setViewport({ width: 1280, height: 7200 })
|
||||
|
||||
Reference in New Issue
Block a user