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:
@@ -265,16 +265,6 @@ async function calculateTotalCharacters(spine: EbookCIF['spine'], resources: Map
|
|||||||
return total;
|
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[] {
|
function generatePageBreaks(totalCharacters: number): number[] {
|
||||||
const breaks: number[] = [];
|
const breaks: number[] = [];
|
||||||
const charsPerPage = 1000; // Rough estimate
|
const charsPerPage = 1000; // Rough estimate
|
||||||
|
|||||||
Reference in New Issue
Block a user