fix: Remove duplicate functions in epub-parsers.ts

Clean up duplicate implementations of resolvePath and
calculateTotalCharacters that were causing syntax errors.
This commit is contained in:
2026-04-04 14:22:16 -04:00
parent 3e48989e83
commit c1477659c1
-10
View File
@@ -265,16 +265,6 @@ async function calculateTotalCharacters(spine: EbookCIF['spine'], resources: Map
return total;
}
function resolvePath(basePath: string, relativePath: string): string {
const baseDir = basePath.substring(0, basePath.lastIndexOf('/') + 1);
return baseDir + relativePath;
}
}
}
return total;
}
function generatePageBreaks(totalCharacters: number): number[] {
const breaks: number[] = [];
const charsPerPage = 1000; // Rough estimate