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:
1 parent
3e48989e83
commit
c1477659c1
1 file changed
-10
@@ -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
|
||||
|
||||
Reference in new issue
Block a user