Refactor table rendering: replace plain text with InlineSpan for rich text support, update row preparation, and improve PDF formatting logic.
This commit is contained in:
+3
-3
@@ -220,11 +220,11 @@ func RenderAST(doc ast.Node, content []byte, r *IHKRenderer) error {
|
||||
if !entering {
|
||||
return ast.WalkContinue, nil
|
||||
}
|
||||
var tableData [][]string
|
||||
var tableData [][][]InlineSpan
|
||||
for row := node.FirstChild(); row != nil; row = row.NextSibling() {
|
||||
var rowData []string
|
||||
var rowData [][]InlineSpan
|
||||
for cell := row.FirstChild(); cell != nil; cell = cell.NextSibling() {
|
||||
rowData = append(rowData, extractPlainText(cell, content))
|
||||
rowData = append(rowData, extractInlineSpans(cell, content))
|
||||
}
|
||||
tableData = append(tableData, rowData)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user