Mercurial > repos > public > wdown
comparison wdown.go @ 10:1ffe6e4f933c
Add math support through MathJax
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 17 Jun 2020 22:13:03 +0200 |
parents | a5aa39557726 |
children | ebecd141e9d3 |
comparison
equal
deleted
inserted
replaced
9:0a3841171c8f | 10:1ffe6e4f933c |
---|---|
7 "io/ioutil" | 7 "io/ioutil" |
8 "log" | 8 "log" |
9 "os" | 9 "os" |
10 | 10 |
11 "github.com/cbroglie/mustache" | 11 "github.com/cbroglie/mustache" |
12 mathjax "github.com/litao91/goldmark-mathjax" | |
12 "github.com/yuin/goldmark" | 13 "github.com/yuin/goldmark" |
13 highlighting "github.com/yuin/goldmark-highlighting" | 14 highlighting "github.com/yuin/goldmark-highlighting" |
14 meta "github.com/yuin/goldmark-meta" | 15 meta "github.com/yuin/goldmark-meta" |
15 "github.com/yuin/goldmark/extension" | 16 "github.com/yuin/goldmark/extension" |
16 "github.com/yuin/goldmark/parser" | 17 "github.com/yuin/goldmark/parser" |
47 md := goldmark.New( | 48 md := goldmark.New( |
48 goldmark.WithExtensions( | 49 goldmark.WithExtensions( |
49 extension.GFM, | 50 extension.GFM, |
50 highlighting.Highlighting, | 51 highlighting.Highlighting, |
51 meta.Meta, | 52 meta.Meta, |
53 mathjax.MathJax, | |
52 ), | 54 ), |
53 goldmark.WithParserOptions( | 55 goldmark.WithParserOptions( |
54 parser.WithAutoHeadingID(), | 56 parser.WithAutoHeadingID(), |
55 ), | 57 ), |
56 ) | 58 ) |