This commit is contained in:
Takagi 2024-05-08 04:03:12 +00:00 committed by GitHub
commit 808f16edfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -58,7 +58,9 @@ const TableCell = Node.create<TableCellOptions>({
default: [100],
parseHTML: (element) => {
const colwidth = element.getAttribute("colwidth");
const value = colwidth ? [parseInt(colwidth, 10)] : null;
const value = colwidth
? colwidth.split(",").map((width) => parseInt(width, 10))
: null;
return value;
},
},

View File

@ -41,8 +41,9 @@ const TableHeader = Node.create<TableCellOptions>({
default: [100],
parseHTML: (element) => {
const colwidth = element.getAttribute("colwidth");
const value = colwidth ? [parseInt(colwidth, 10)] : null;
const value = colwidth
? colwidth.split(",").map((width) => parseInt(width, 10))
: null;
return value;
},
},