Исправление автоформирования заголовка при вставке из буфера обмена

This commit is contained in:
Book Pauk
2019-06-23 16:29:36 +07:00
parent d9c389812a
commit a4b56b477d
4 changed files with 18 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ class ConvertHtml extends ConvertBase {
} else {
isText = opts.isText;
}
const {cutTitle} = opts;
let {cutTitle} = opts;
let titleInfo = {};
let desc = {_n: 'description', 'title-info': titleInfo};
@@ -123,8 +123,11 @@ class ConvertHtml extends ConvertBase {
}
}
if (tag == 'title')
if (tag == 'title' || tag == 'cut-title') {
inTitle = true;
if (tag == 'cut-title')
cutTitle = true;
}
if (tag == 'fb2-image') {
inImage = true;
@@ -153,7 +156,7 @@ class ConvertHtml extends ConvertBase {
}
}
if (tag == 'title')
if (tag == 'title' || tag == 'cut-title')
inTitle = false;
if (tag == 'fb2-image')