Skip to content

Commit f96a3ad

Browse files
authored
Merge pull request #146 from yoonhyunwoo/feature/treeblood-extensions
feat(markdown): add treeblood extensions for enhanced markdown parsing
2 parents 8a02f25 + 4171be7 commit f96a3ad

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ require (
5858
github.com/shopspring/decimal v1.4.0 // indirect
5959
github.com/tdewolff/parse/v2 v2.8.3 // indirect
6060
github.com/valyala/fastjson v1.6.4 // indirect
61+
github.com/wyatt915/goldmark-treeblood v0.0.0-20250825231212-5dcbdb2f4b57 // indirect
62+
github.com/wyatt915/treeblood v0.1.13 // indirect
6163
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
6264
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0 // indirect
6365
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.63.0 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ github.com/tdewolff/test v1.0.11 h1:FdLbwQVHxqG16SlkGveC0JVyrJN62COWTRyUFzfbtBE=
121121
github.com/tdewolff/test v1.0.11/go.mod h1:XPuWBzvdUzhCuxWO1ojpXsyzsA5bFoS3tO/Q3kFuTG8=
122122
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
123123
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
124+
github.com/wyatt915/goldmark-treeblood v0.0.0-20250825231212-5dcbdb2f4b57 h1:UqtQdzLXnvdBdqn/go53qGyncw1wJ7Mq5SQdieM1/Ew=
125+
github.com/wyatt915/goldmark-treeblood v0.0.0-20250825231212-5dcbdb2f4b57/go.mod h1:BxSCWByWSRSuembL3cDG1IBUbkBoO/oW/6tF19aA4hs=
126+
github.com/wyatt915/treeblood v0.1.13 h1:uZu36eXIlmuj8YL5gwgMdQVxblF4dtjuOzpyjpE1waI=
127+
github.com/wyatt915/treeblood v0.1.13/go.mod h1:wQmihhy7SYtGTnq5MxgNfxoaNW+ULr8oWPJJMreH4p8=
124128
github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
125129
github.com/yuin/goldmark v1.7.13 h1:GPddIs617DnBLFFVJFgpo1aBfe/4xcvMc3SB5t/D0pA=
126130
github.com/yuin/goldmark v1.7.13/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=

internal/markdown/parse.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919

2020
chtml "github.com/alecthomas/chroma/v2/formatters/html"
2121
"github.com/rs/zerolog/log"
22+
treeblood "github.com/wyatt915/goldmark-treeblood"
2223
"github.com/yuin/goldmark"
2324
highlighting "github.com/yuin/goldmark-highlighting/v2"
2425
meta "github.com/yuin/goldmark-meta"
@@ -122,6 +123,7 @@ var gMark = goldmark.New(
122123
),
123124
highlighting.WithGuessLanguage(true),
124125
),
126+
treeblood.MathML(),
125127
extension.GFM,
126128
extension.CJK,
127129
),

0 commit comments

Comments
 (0)