diff options
author | OMOTO Tsukasa <tsukasa@oomo.to> | 2023-10-29 18:13:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 10:13:56 +0100 |
commit | db14238ba323279b28e7ad4cfff5aa10909ccd18 (patch) | |
tree | 6b0059b2ccf27fe7d262fea95d7be3629bef8eff /markup/goldmark/convert.go | |
parent | 3f64b5a3de5f097c4ee1b70505398f75feb391c4 (diff) |
markup/goldmark: Update the CJK extension to allow specifying line break styles
This commit follows https://github.com/yuin/goldmark/pull/411
Diffstat (limited to 'markup/goldmark/convert.go')
-rw-r--r-- | markup/goldmark/convert.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/markup/goldmark/convert.go b/markup/goldmark/convert.go index d66687783..6ebcd8a77 100644 --- a/markup/goldmark/convert.go +++ b/markup/goldmark/convert.go @@ -140,7 +140,11 @@ func newMarkdown(pcfg converter.ProviderConfig) goldmark.Markdown { if cfg.Extensions.CJK.Enable { opts := []extension.CJKOption{} if cfg.Extensions.CJK.EastAsianLineBreaks { - opts = append(opts, extension.WithEastAsianLineBreaks()) + if cfg.Extensions.CJK.EastAsianLineBreaksStyle == "css3draft" { + opts = append(opts, extension.WithEastAsianLineBreaks(extension.EastAsianLineBreaksCSS3Draft)) + } else { + opts = append(opts, extension.WithEastAsianLineBreaks()) + } } if cfg.Extensions.CJK.EscapedSpace { |