Browse Source

Улучшение парсера fb2

Book Pauk 5 years ago
parent
commit
d897a7400f
1 changed files with 4 additions and 5 deletions
  1. 4 5
      client/components/Reader/share/BookParser.js

+ 4 - 5
client/components/Reader/share/BookParser.js

@@ -369,11 +369,10 @@ export default class BookParser {
             tClose += (bold ? '</strong>' : '');
             tClose += (bold ? '</strong>' : '');
             tClose += (center ? '</center>' : '');
             tClose += (center ? '</center>' : '');
 
 
-            if (path.indexOf('/fictionbook/body/title') == 0) {
-                growParagraph(`${tOpen}${text}${tClose}`, text.length);
-            }
-
-            if (path.indexOf('/fictionbook/body/section') == 0) {
+            if (path.indexOf('/fictionbook/body/title') == 0 ||
+                path.indexOf('/fictionbook/body/section') == 0 ||
+                path.indexOf('/fictionbook/body/epigraph') == 0
+                ) {
                 growParagraph(`${tOpen}${text}${tClose}`, text.length);
                 growParagraph(`${tOpen}${text}${tClose}`, text.length);
             }
             }