Fixed some problems

This commit is contained in:
HMLTFan 2022-01-30 13:10:30 +08:00
parent 7214ec1e28
commit 6462421bb9
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ module.exports = function(hexo) {
active = ' class="is-active"';
hidden = '';
}
if (match[3] === 'active' && match[3].substring(1) !== '') icon = `<span class="icon is-small"><i class="fas fa-${match[3].substring(1)}" aria-hidden="true"></i></span>`;
if (match[3] !== undefined && match[3].substring(1) !== '') icon = `<span class="icon is-small"><i class="fas fa-${match[3].substring(1)}" aria-hidden="true"></i></span>`;
if (contentString.match(/^ {4}|^\t{1}/gm) !== null && contentString.match(/^ {4}|^\t{1}/gm).length === contentString.split('\n').length) contentString = contentString.replace(/^ {4}|^\t{1}/g, '').replace(/\n {4}|\n\t{1}/g, '\n');
tabsEl += `