mirror of
https://github.com/usememos/memos.git
synced 2026-12-02 00:39:17 +01:00
chore: remove unused syntax
- Removed the wikilink extension from markdown services in test and API service. - Deleted the DefaultLink and WikiLink components, simplifying link handling. - Updated ConditionalComponent to remove wikilink checks. - Adjusted MemoContent to exclude wikilink handling in markdown rendering. - Refined markdown styles for compact rendering, enhancing readability. - Added a Markdown Styling Guide to document the new compact styling approach.
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
package ast
|
||||
|
||||
import (
|
||||
gast "github.com/yuin/goldmark/ast"
|
||||
)
|
||||
|
||||
// WikilinkNode represents [[target]] or [[target?params]] syntax.
|
||||
type WikilinkNode struct {
|
||||
gast.BaseInline
|
||||
|
||||
// Target is the link destination (e.g., "memos/1", "Hello world", "resources/101")
|
||||
Target []byte
|
||||
|
||||
// Params are optional parameters (e.g., "align=center" from [[target?align=center]])
|
||||
Params []byte
|
||||
}
|
||||
|
||||
// KindWikilink is the NodeKind for WikilinkNode.
|
||||
var KindWikilink = gast.NewNodeKind("Wikilink")
|
||||
|
||||
// Kind returns KindWikilink.
|
||||
func (*WikilinkNode) Kind() gast.NodeKind {
|
||||
return KindWikilink
|
||||
}
|
||||
|
||||
// Dump implements Node.Dump for debugging.
|
||||
func (n *WikilinkNode) Dump(source []byte, level int) {
|
||||
gast.DumpHelper(n, source, level, map[string]string{
|
||||
"Target": string(n.Target),
|
||||
"Params": string(n.Params),
|
||||
}, nil)
|
||||
}
|
||||
Reference in New Issue
Block a user