Эх сурвалжийг харах

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

Book Pauk 5 жил өмнө
parent
commit
d897a7400f

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

@@ -369,11 +369,10 @@ export default class BookParser {
             tClose += (bold ? '</strong>' : '');
             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);
             }