Работа над конвертером pdf

This commit is contained in:
Book Pauk
2020-12-09 03:06:15 +07:00
parent 15f02c7115
commit 522f953b4f
2 changed files with 52 additions and 13 deletions

View File

@@ -256,21 +256,19 @@ class ConvertHtml extends ConvertBase {
}
newPar();
let j = 0;
const lines = par._t.split('\n');
for (let line of lines) {
line = repCrLfTab(line);
for (let j = 0; j < lines.length; j++) {
const line = repCrLfTab(lines[j]);
let l = 0;
while (l < line.length && line[l] == ' ') {
l++;
}
if (l >= parIndent || line == '') {
if (j > 0)
newPar();
j++;
if ((j > 0 && l >= parIndent) ||
(j < lines.length - 1 && line == '') ){
newPar();
}
curPar._t += line.trim() + ' ';