This commit is contained in:
parent
aaedbb2a7f
commit
3a43c97684
2 changed files with 12 additions and 0 deletions
|
@ -402,7 +402,13 @@ func resolveRefContent0(node *ast.Node, anchors *map[string]string, depth *int,
|
|||
ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent:
|
||||
buf.Write(n.Tokens)
|
||||
case ast.NodeTextMark:
|
||||
if n.IsTextMarkType("tag") {
|
||||
buf.WriteByte('#')
|
||||
}
|
||||
buf.WriteString(n.Content())
|
||||
if n.IsTextMarkType("tag") {
|
||||
buf.WriteByte('#')
|
||||
}
|
||||
case ast.NodeBlockRef:
|
||||
if anchor := n.ChildByType(ast.NodeBlockRefText); nil != anchor {
|
||||
buf.WriteString(anchor.Text())
|
||||
|
|
|
@ -143,7 +143,13 @@ func NodeStaticContent(node *ast.Node) string {
|
|||
ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent, ast.NodeHTMLBlock:
|
||||
buf.Write(n.Tokens)
|
||||
case ast.NodeTextMark:
|
||||
if n.IsTextMarkType("tag") {
|
||||
buf.WriteByte('#')
|
||||
}
|
||||
buf.WriteString(n.Content())
|
||||
if n.IsTextMarkType("tag") {
|
||||
buf.WriteByte('#')
|
||||
}
|
||||
case ast.NodeBackslash:
|
||||
buf.WriteByte(lex.ItemBackslash)
|
||||
case ast.NodeBackslashContent:
|
||||
|
|
Loading…
Add table
Reference in a new issue