fix: table template

This commit is contained in:
yanmao 2022-01-12 15:40:43 +08:00
parent 81858ead8c
commit 0ddea07f39
1 changed files with 2 additions and 2 deletions

View File

@ -173,9 +173,9 @@ class Template implements TemplateInterface {
if (html) {
const hasColGroup = html.indexOf('<colgroup') > -1;
html = transformCustomTags(html);
html = transformCustomTags(html) || html;
if (!hasColGroup) {
html = replace(/^(<table[^>]+>)/, function (match) {
html = html?.replace(/^(<table[^>]+>)/, function (match) {
return match + colgroup;
});
}