mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-20 14:23:17 +00:00
25 lines
503 B
Go
25 lines
503 B
Go
|
package warpc
|
||
|
|
||
|
import (
|
||
|
_ "embed"
|
||
|
)
|
||
|
|
||
|
//go:embed wasm/renderkatex.wasm
|
||
|
var katexWasm []byte
|
||
|
|
||
|
// See https://katex.org/docs/options.html
|
||
|
type KatexInput struct {
|
||
|
Expression string `json:"expression"`
|
||
|
Options KatexOptions `json:"options"`
|
||
|
}
|
||
|
|
||
|
type KatexOptions struct {
|
||
|
Output string `json:"output"` // html, mathml (default), htmlAndMathml
|
||
|
DisplayMode bool `json:"displayMode"`
|
||
|
ThrowOnError bool `json:"throwOnError"`
|
||
|
}
|
||
|
|
||
|
type KatexOutput struct {
|
||
|
Output string `json:"output"`
|
||
|
}
|