Поправки парсера fb2
This commit is contained in:
@@ -45,6 +45,7 @@ export default class BookParser {
|
|||||||
let italic = false;
|
let italic = false;
|
||||||
let space = 0;
|
let space = 0;
|
||||||
let inPara = false;
|
let inPara = false;
|
||||||
|
let isFirstBody = true;
|
||||||
let isFirstSection = true;
|
let isFirstSection = true;
|
||||||
let isFirstTitlePara = false;
|
let isFirstTitlePara = false;
|
||||||
|
|
||||||
@@ -201,6 +202,12 @@ export default class BookParser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (path.indexOf('/fictionbook/body') == 0) {
|
if (path.indexOf('/fictionbook/body') == 0) {
|
||||||
|
if (tag == 'body') {
|
||||||
|
if (!isFirstBody)
|
||||||
|
newParagraph(' ', 1);
|
||||||
|
isFirstBody = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (tag == 'title') {
|
if (tag == 'title') {
|
||||||
newParagraph(' ', 1);
|
newParagraph(' ', 1);
|
||||||
isFirstTitlePara = true;
|
isFirstTitlePara = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user