feat: implement math expression parser

This commit is contained in:
Steven
2024-01-04 20:05:29 +08:00
parent c842b921bc
commit d12a2b0c38
17 changed files with 797 additions and 315 deletions

View File

@@ -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)
}