Поправки багов

This commit is contained in:
Book Pauk
2019-02-21 21:36:17 +07:00
parent e5384e27e5
commit ab29c80dab
2 changed files with 16 additions and 3 deletions

View File

@@ -231,6 +231,7 @@ class BookConverter {
let tag = '';// eslint-disable-line no-unused-vars
let inText = false;
let textFound = false;
let node = {_a: pars};
let inPara = false;
@@ -374,8 +375,10 @@ class BookConverter {
};
const onComment = (text) => {// eslint-disable-line no-unused-vars
if (text == '--------- Собственно произведение -------------')
if (text == '--------- Собственно произведение -------------') {
inText = true;
textFound = true;
}
if (text == '-----------------------------------------------')
inText = false;
};
@@ -418,6 +421,10 @@ class BookConverter {
innerCut: new Set(['head', 'script', 'style'])
});
//текст не найден на странице, обрабатываем как html
if (!textFound)
return this.convertHtml(data);
const title = (titleInfo['book-title'] ? titleInfo['book-title'] : '');
let author = '';
if (titleInfo.author) {