Поправки парсера fb2

This commit is contained in:
Book Pauk
2019-02-23 23:51:06 +07:00
parent 06221a474b
commit 4de0b3cffd

View File

@@ -45,6 +45,7 @@ export default class BookParser {
let italic = false;
let space = 0;
let inPara = false;
let isFirstBody = true;
let isFirstSection = true;
let isFirstTitlePara = false;
@@ -201,6 +202,12 @@ export default class BookParser {
}
if (path.indexOf('/fictionbook/body') == 0) {
if (tag == 'body') {
if (!isFirstBody)
newParagraph(' ', 1);
isFirstBody = false;
}
if (tag == 'title') {
newParagraph(' ', 1);
isFirstTitlePara = true;