mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
✨ 增加公共代码 js/css 片段 https://github.com/siyuan-note/siyuan/issues/6143
This commit is contained in:
parent
ee413a6352
commit
5aa5764974
2 changed files with 6 additions and 8 deletions
|
|
@ -42,8 +42,9 @@ func getSnippet(c *gin.Context) {
|
|||
enabled = false
|
||||
}
|
||||
|
||||
confSnippets := model.LoadSnippets()
|
||||
var snippets []*conf.Snippet
|
||||
for _, s := range model.Snippets {
|
||||
for _, s := range confSnippets {
|
||||
if ("all" == typ || s.Type == typ) && (2 == enabledArg || s.Enabled == enabled) {
|
||||
snippets = append(snippets, s)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue