mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🎨 Improve parser https://ld246.com/article/1710381064911
This commit is contained in:
parent
a5ce4139a6
commit
91ad199142
1 changed files with 5 additions and 0 deletions
|
|
@ -231,6 +231,11 @@ func fixLegacyData(tip, node *ast.Node, idMap *map[string]bool, needFix, needMig
|
||||||
node.Tokens = []byte("Untitled")
|
node.Tokens = []byte("Untitled")
|
||||||
*needFix = true
|
*needFix = true
|
||||||
}
|
}
|
||||||
|
if 1 == len(node.Tokens) && bytes.Equal(node.Tokens, []byte("\n")) {
|
||||||
|
// https://ld246.com/article/1710381064911
|
||||||
|
node.Tokens = []byte("")
|
||||||
|
*needFix = true
|
||||||
|
}
|
||||||
case ast.NodeTagCloseMarker:
|
case ast.NodeTagCloseMarker:
|
||||||
if nil != tip.LastChild {
|
if nil != tip.LastChild {
|
||||||
if ast.NodeTagOpenMarker == tip.LastChild.Type {
|
if ast.NodeTagOpenMarker == tip.LastChild.Type {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue