Небольшое улучшение парсинга оглавления

This commit is contained in:
Book Pauk
2020-12-14 02:07:20 +07:00
parent 80a29e654d
commit 17699f66f8

View File

@@ -304,6 +304,11 @@ export default class BookParser {
bold = true;
center = true;
if (curTitle.paraIndex < 0) {
curTitle = {paraIndex, title: 'Оглавление', inset: sectionLevel, bodyIndex, subtitles: []};
this.contents.push(curTitle);
}
inSubtitle = true;
curSubtitle = {paraIndex, inset: sectionLevel, title: ''};
curTitle.subtitles.push(curSubtitle);