Поправка бага

This commit is contained in:
Book Pauk
2019-02-20 17:32:26 +07:00
parent 55d02495a3
commit 618111ab05

View File

@@ -427,7 +427,7 @@ export default class BookParser {
if (i - spaceIndex >= maxWordLength && i < p.text.length - 1 &&
this.measureText(p.text.substr(spaceIndex + 1, i - spaceIndex), p.style) >= this.w - this.p) {
result.push({style: p.style, image: p.image, text: p.text.substr(0, i + 1)});
p = {style: p.style, text: p.text.substr(i + 1)};
p = {style: p.style, image: p.image, text: p.text.substr(i + 1)};
spaceIndex = -1;
i = -1;
}