A fast, helpful, and open-source document parser
fix buggy-font handling edge cases
Logan Markewich6fc5456d28e6
diff --git a/src/engines/pdf/pdfjs.ts b/src/engines/pdf/pdfjs.tsindex 7cf4a22..ccb4452 100644--- a/src/engines/pdf/pdfjs.ts+++ b/src/engines/pdf/pdfjs.ts@@ -120,8 +120,8 @@ function singularValueDecompose2dScale(m: number[]): { x: number; y: number } {return { x: Math.sqrt(sx), y: Math.sqrt(sy) };}-// Pre-compiled regex patterns for string decoding (avoid recompilation per item)-const BUGGY_FONT_MARKER_REGEX = /:->|>_(\d+)_\d+_<|<-:/g;+// Pre-compiled regex patterns for string decoding+const BUGGY_FONT_MARKER_REGEX = /:->\|>_(\d+)_\d+_<\|<-:/g;const BUGGY_FONT_MARKER_CHECK = ":->|>";const PIPE_PATTERN_REGEX = /\s*\|([^|])\|\s*/g;