Skip to content

Commit

Permalink
fix(table-head): fix th content not rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
lyngai authored and humyfred committed Mar 4, 2022
1 parent 98f4198 commit 98ce938
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/hooks/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ export default class Table extends ParagraphBase {
const tableHeader = this.$extendColumns(rows[0], maxCol)
.map((cell, col) => {
tableObject.header.push(cell.replace(/~CS/g, '\\|'));
const { html: cellHtml } = sentenceMakeFunc(cell.replace(/~CS/g, '\\|').trim());
// 前后补一个空格,否则自动链接会将缓存的内容全部收入链接内部
return `~CTH${textAlignRules[col] || 'U'} ${cell.replace(/~CS/g, '\\|').trim()} ~CTH$`;
return `~CTH${textAlignRules[col] || 'U'} ${cellHtml} ~CTH$`;
})
.join('');
const tableRows = rows
Expand Down

0 comments on commit 98ce938

Please sign in to comment.