mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: implement math expression parser
This commit is contained in:
@@ -177,3 +177,17 @@ func (*EscapingCharacter) Type() NodeType {
|
||||
func (n *EscapingCharacter) Restore() string {
|
||||
return fmt.Sprintf("\\%s", n.Symbol)
|
||||
}
|
||||
|
||||
type Math struct {
|
||||
BaseInline
|
||||
|
||||
Content string
|
||||
}
|
||||
|
||||
func (*Math) Type() NodeType {
|
||||
return MathNode
|
||||
}
|
||||
|
||||
func (n *Math) Restore() string {
|
||||
return fmt.Sprintf("$%s$", n.Content)
|
||||
}
|
||||
|
Reference in New Issue
Block a user