aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/goldmark/convert.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/goldmark/convert.go')
-rw-r--r--markup/goldmark/convert.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/markup/goldmark/convert.go b/markup/goldmark/convert.go
index 20bbfc210..fa2ab548b 100644
--- a/markup/goldmark/convert.go
+++ b/markup/goldmark/convert.go
@@ -136,6 +136,19 @@ func newMarkdown(pcfg converter.ProviderConfig) goldmark.Markdown {
extensions = append(extensions, extension.Footnote)
}
+ if cfg.Extensions.CJK.Enable {
+ opts := []extension.CJKOption{}
+ if cfg.Extensions.CJK.EastAsianLineBreaks {
+ opts = append(opts, extension.WithEastAsianLineBreaks())
+ }
+
+ if cfg.Extensions.CJK.EscapedSpace {
+ opts = append(opts, extension.WithEscapedSpace())
+ }
+ c := extension.NewCJK(opts...)
+ extensions = append(extensions, c)
+ }
+
if cfg.Parser.AutoHeadingID {
parserOptions = append(parserOptions, parser.WithAutoHeadingID())
}