mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-10-01 09:19:34 +05:30
pdfjs validates standardFontDataUrl as a URL ending in a forward slash — our raw path with a trailing path.sep is invalid on Windows (C:\...\), failing extractText/extractImages (and every test that verifies through them) with 'Invalid factory url: must include trailing slash'. Linux and macOS passed only because / is also a valid URL slash. Convert with pathToFileURL() so every platform sends file:///.../standard_fonts/. Also escape path.sep in PDFBatchOperations' sanitizer test regex — a bare backslash made new RegExp() a syntax error on Windows.