diff --git a/client/components/Reader/TextPage/DrawHelper.js b/client/components/Reader/TextPage/DrawHelper.js index 26b629e6..21abb4ad 100644 --- a/client/components/Reader/TextPage/DrawHelper.js +++ b/client/components/Reader/TextPage/DrawHelper.js @@ -73,7 +73,7 @@ export default class DrawHelper { let lineText = ''; let center = false; - let space = false; + let space = 0; let j = 0; //формируем строку for (const part of line.parts) { @@ -97,7 +97,7 @@ export default class DrawHelper { lineText += `${tOpen}${text}${tClose}`; center = center || part.style.center; - space = space || part.style.space; + space = (part.style.space > 0 ? part.style.space : space); //избражения //image: {local: Boolean, inline: Boolean, id: String, imageLine: Number, lineCount: Number, paraIndex: Number}, @@ -129,7 +129,7 @@ export default class DrawHelper { const centerStyle = (center ? `text-align: center; text-align-last: center; width: ${this.w}px` : '') if ((line.first || space) && !center) { let p = (line.first ? this.p : 0); - p = (space ? p + this.p : p); + p = (space ? p + this.p*space : p); lineText = `${lineText}`; } diff --git a/client/components/Reader/share/BookParser.js b/client/components/Reader/share/BookParser.js index 7f8829de..0c5de7fb 100644 --- a/client/components/Reader/share/BookParser.js +++ b/client/components/Reader/share/BookParser.js @@ -39,7 +39,7 @@ export default class BookParser { let center = false; let bold = false; let italic = false; - let space = false; + let space = 0; this.binary = {}; let binaryId = ''; @@ -179,7 +179,7 @@ export default class BookParser { if (tag == 'epigraph') { italic = true; - space = true; + space += 1; } if (tag == 'poem') { @@ -187,7 +187,8 @@ export default class BookParser { } if (tag == 'text-author') { - space = true; + newParagraph(' ', 1); + space += 1; } } }; @@ -214,7 +215,7 @@ export default class BookParser { if (tag == 'epigraph') { italic = false; - space = false; + space -= 1; } if (tag == 'stanza') { @@ -222,7 +223,7 @@ export default class BookParser { } if (tag == 'text-author') { - space = false; + space -= 1; } } @@ -285,7 +286,7 @@ export default class BookParser { let tOpen = (center ? '