mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Improve table parsing https://github.com/siyuan-note/siyuan/issues/11630
This commit is contained in:
@@ -63,6 +63,13 @@ func HTML2Markdown(htmlStr string) (markdown string, withMath bool, err error) {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
if ast.NodeText == n.Type {
|
||||
if n.ParentIs(ast.NodeTableCell) {
|
||||
n.Tokens = bytes.ReplaceAll(n.Tokens, []byte("\\|"), []byte("|"))
|
||||
n.Tokens = bytes.ReplaceAll(n.Tokens, []byte("|"), []byte("\\|"))
|
||||
}
|
||||
}
|
||||
|
||||
if ast.NodeInlineMath == n.Type {
|
||||
withMath = true
|
||||
return ast.WalkContinue
|
||||
|
||||
Reference in New Issue
Block a user