diff options
author | OMOTO Tsukasa <tsukasa@oomo.to> | 2023-08-30 20:08:45 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-30 13:08:45 +0200 |
commit | d7dcc76d27dc55b10b9a5c4294c4a883d0bdfb2e (patch) | |
tree | a285aaffd7d96357410da2d715263ceea3f44b2d /markup/goldmark/goldmark_config | |
parent | 9bf76fd7e8829355650ad94255776e2fbb269674 (diff) |
markup/goldmark: Add CJK extension
Fixes #10472
Diffstat (limited to 'markup/goldmark/goldmark_config')
-rw-r--r-- | markup/goldmark/goldmark_config/config.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/markup/goldmark/goldmark_config/config.go b/markup/goldmark/goldmark_config/config.go index a6fe0e624..dfbcc5a90 100644 --- a/markup/goldmark/goldmark_config/config.go +++ b/markup/goldmark/goldmark_config/config.go @@ -43,6 +43,11 @@ var Default = Config{ Linkify: true, LinkifyProtocol: "https", TaskList: true, + CJK: CJK{ + Enable: false, + EastAsianLineBreaks: false, + EscapedSpace: false, + }, }, Renderer: Renderer{ Unsafe: false, @@ -76,6 +81,7 @@ type Extensions struct { Linkify bool LinkifyProtocol string TaskList bool + CJK CJK } // Typographer holds typographer configuration. @@ -105,6 +111,17 @@ type Typographer struct { Apostrophe string } +type CJK struct { + // Whether to enable CJK support. + Enable bool + + // Whether softline breaks between east asian wide characters should be ignored. + EastAsianLineBreaks bool + + // Whether a '\' escaped half-space(0x20) should not be rendered. + EscapedSpace bool +} + type Renderer struct { // Whether softline breaks should be rendered as '<br>' HardWraps bool |