From 3782f0a7fba9fc7e5ba6fb43bb9a56d0858e9597 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Thu, 25 Sep 2025 13:43:13 +0200 Subject: [PATCH] fix: remove extra quotes from pandoc resource path arguments - Remove manual quotes around templatesDir path in PandocCommandBuilder - Node.js spawn() handles argument quoting automatically - Manual quotes can break path resolution, especially on Windows - Follows Node.js best practices for child_process.spawn() CodeRabbit suggestion implementation 1/6 --- src/converters/pandoc/PandocCommandBuilder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/converters/pandoc/PandocCommandBuilder.ts b/src/converters/pandoc/PandocCommandBuilder.ts index 577cd50..f597b34 100644 --- a/src/converters/pandoc/PandocCommandBuilder.ts +++ b/src/converters/pandoc/PandocCommandBuilder.ts @@ -109,8 +109,8 @@ export class PandocCommandBuilder { // Add plugin templates directory as a resource path so Typst can find template files const templatesDir = pathUtils.joinPath(absolutePluginDir, 'templates'); - // Quote the path to handle spaces and special characters - args.push('--resource-path', `"${templatesDir}"`); + // Path quoting handled automatically by spawn + args.push('--resource-path', templatesDir); // Pass the actual template path as a variable // Use relative path from vault root for Typst import