From 0d773ca7ed4e7ed1ea55f2eb94d6f514932a5897 Mon Sep 17 00:00:00 2001 From: KJyang-0114 Date: Sun, 8 Mar 2026 04:59:50 +0800 Subject: [PATCH] fix: enable JavaScript for code block syntax highlighting in PDF export The PDF export was failing to display code blocks with syntax highlighting because JavaScript was disabled in the print window. This fixes issue #2984. --- browser/main/lib/dataApi/formatPDF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/main/lib/dataApi/formatPDF.js b/browser/main/lib/dataApi/formatPDF.js index a852dc905..60b888012 100644 --- a/browser/main/lib/dataApi/formatPDF.js +++ b/browser/main/lib/dataApi/formatPDF.js @@ -5,7 +5,7 @@ export default function formatPDF(props) { return function(note, targetPath, exportTasks) { const printout = new remote.BrowserWindow({ show: false, - webPreferences: { webSecurity: false, javascript: false } + webPreferences: { webSecurity: false, javascript: true } }) printout.loadURL(