Добавил настройку cutEmptyParagraphs

This commit is contained in:
Book Pauk
2019-02-14 17:34:52 +07:00
parent d306f972cc
commit 5af1f81bc3
5 changed files with 27 additions and 4 deletions

View File

@@ -18,7 +18,8 @@ const bmRecentStore = localForage.createInstance({
});
class BookManager {
async init() {
async init(settings) {
this.settings = settings;
this.books = {};
this.recent = {};
this.recentChanged = true;
@@ -130,7 +131,7 @@ class BookManager {
async parseBook(meta, data, callback) {
if (!this.books)
await this.init();
const parsed = new BookParser();
const parsed = new BookParser(this.settings);
const parsedMeta = await parsed.parse(data, callback);
const result = Object.assign({}, meta, parsedMeta, {