bugfix: 自动加空格时有些标签没加上

This commit is contained in:
Zhicheng Wang 2016-06-19 19:45:07 +08:00
parent 7202fa6cb4
commit 8ffaf06b72
1 changed files with 2 additions and 2 deletions

View File

@ -66,9 +66,9 @@ var sourceVisible = localStorage.getItem('source-visible') === 'true';
if (!word.replace(/\s/, '')) { if (!word.replace(/\s/, '')) {
return ''; return '';
} else if (/<[^>]*>/.test(word)) { } else if (/<[^>]*>/.test(word)) {
return word; return ' ' + word + ' ';
} else { } else {
return '<span lang="english">' + word + '</span>'; return ' ' + word + ' ';
} }
}); });
node.innerHTML = text; node.innerHTML = text;