Browse Source

:art: 导出 PDF

Liang Ding 2 years ago
parent
commit
542f543c85
1 changed files with 4 additions and 0 deletions
  1. 4 0
      kernel/model/export.go

+ 4 - 0
kernel/model/export.go

@@ -1140,6 +1140,10 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros bool) (ret *parse.T
 			n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + refFoot.refNum), FootnotesRefId: refFoot.refNum, FootnotesRefLabel: []byte("^" + refFoot.refNum)})
 			n.InsertBefore(&ast.Node{Type: ast.NodeFootnotesRef, Tokens: []byte("^" + refFoot.refNum), FootnotesRefId: refFoot.refNum, FootnotesRefLabel: []byte("^" + refFoot.refNum)})
 		}
 		}
 		unlinks = append(unlinks, n)
 		unlinks = append(unlinks, n)
+		if nil != n.Next && ast.NodeKramdownSpanIAL == n.Next.Type {
+			// 引用加排版标记(比如颜色)重叠时丢弃后面的排版属性节点
+			unlinks = append(unlinks, n.Next)
+		}
 		return ast.WalkSkipChildren
 		return ast.WalkSkipChildren
 	})
 	})
 	for _, n := range unlinks {
 	for _, n := range unlinks {