Pārlūkot izejas kodu

Мелкая поправка

Book Pauk 6 gadi atpakaļ
vecāks
revīzija
06221a474b
1 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 6 2
      server/core/BookConverter/index.js

+ 6 - 2
server/core/BookConverter/index.js

@@ -270,8 +270,12 @@ class BookConverter {
         };
         };
 
 
         const growParagraph = (text) => {
         const growParagraph = (text) => {
-            if (!node._p)
-                openTag('p');
+            if (!node._p) {
+                if (text.trim() != '')
+                    openTag('p');
+                else
+                    return;
+            }
             if (node._n == 'p' && node._a.length == 0)
             if (node._n == 'p' && node._a.length == 0)
                 text = text.trimLeft();
                 text = text.trimLeft();
             node._a.push({_t: text});
             node._a.push({_t: text});