mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 19:41:05 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
4155d9afdd
@ -709,6 +709,16 @@ func NewLute() (ret *lute.Lute) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func EnableLuteInlineSyntax(luteEngine *lute.Lute) {
|
||||||
|
luteEngine.SetInlineAsterisk(true)
|
||||||
|
luteEngine.SetInlineUnderscore(true)
|
||||||
|
luteEngine.SetSup(true)
|
||||||
|
luteEngine.SetSub(true)
|
||||||
|
luteEngine.SetTag(true)
|
||||||
|
luteEngine.SetInlineMath(true)
|
||||||
|
luteEngine.SetGFMStrikethrough(true)
|
||||||
|
}
|
||||||
|
|
||||||
func (conf *AppConf) Save() {
|
func (conf *AppConf) Save() {
|
||||||
if util.ReadOnly {
|
if util.ReadOnly {
|
||||||
return
|
return
|
||||||
|
@ -580,6 +580,7 @@ func Preview(id string) (retStdHTML string) {
|
|||||||
Conf.Export.BlockRefTextLeft, Conf.Export.BlockRefTextRight,
|
Conf.Export.BlockRefTextLeft, Conf.Export.BlockRefTextRight,
|
||||||
Conf.Export.AddTitle, true, true, &map[string]*parse.Tree{})
|
Conf.Export.AddTitle, true, true, &map[string]*parse.Tree{})
|
||||||
luteEngine := NewLute()
|
luteEngine := NewLute()
|
||||||
|
EnableLuteInlineSyntax(luteEngine)
|
||||||
luteEngine.SetFootnotes(true)
|
luteEngine.SetFootnotes(true)
|
||||||
addBlockIALNodes(tree, false)
|
addBlockIALNodes(tree, false)
|
||||||
md := treenode.FormatNode(tree.Root, luteEngine)
|
md := treenode.FormatNode(tree.Root, luteEngine)
|
||||||
|
@ -1036,13 +1036,7 @@ func CreateWithMarkdown(tags, boxID, hPath, md, parentID, id string, withMath bo
|
|||||||
luteEngine.SetHTMLTag2TextMark(true)
|
luteEngine.SetHTMLTag2TextMark(true)
|
||||||
if strings.HasPrefix(clippingHref, "https://ld246.com/article/") || strings.HasPrefix(clippingHref, "https://liuyun.io/article/") {
|
if strings.HasPrefix(clippingHref, "https://ld246.com/article/") || strings.HasPrefix(clippingHref, "https://liuyun.io/article/") {
|
||||||
// 改进链滴剪藏 https://github.com/siyuan-note/siyuan/issues/13117
|
// 改进链滴剪藏 https://github.com/siyuan-note/siyuan/issues/13117
|
||||||
luteEngine.SetInlineAsterisk(true)
|
EnableLuteInlineSyntax(luteEngine)
|
||||||
luteEngine.SetInlineUnderscore(true)
|
|
||||||
luteEngine.SetSup(true)
|
|
||||||
luteEngine.SetSub(true)
|
|
||||||
luteEngine.SetTag(true)
|
|
||||||
luteEngine.SetInlineMath(true)
|
|
||||||
luteEngine.SetGFMStrikethrough(true)
|
|
||||||
}
|
}
|
||||||
dom := luteEngine.Md2BlockDOM(md, false)
|
dom := luteEngine.Md2BlockDOM(md, false)
|
||||||
retID, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)
|
retID, err = createDocsByHPath(box.ID, hPath, dom, parentID, id)
|
||||||
|
Loading…
Reference in New Issue
Block a user