summaryrefslogtreecommitdiffstats
path: root/markup/goldmark/convert_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/goldmark/convert_test.go')
-rw-r--r--markup/goldmark/convert_test.go54
1 files changed, 54 insertions, 0 deletions
diff --git a/markup/goldmark/convert_test.go b/markup/goldmark/convert_test.go
index 6d73b301f..c97156f7a 100644
--- a/markup/goldmark/convert_test.go
+++ b/markup/goldmark/convert_test.go
@@ -675,6 +675,60 @@ eastAsianLineBreaks=true
c.Assert(got, qt.Contains, "<p>私は太郎です。プログラミングが好きで、運動が苦手です。</p>\n")
}
+func TestConvertCJKWithExtensionWithEastAsianLineBreaksOptionWithSimple(t *testing.T) {
+ c := qt.New(t)
+
+ content := `
+私は太郎です。
+Programming が好きで、
+運動が苦手です。
+`
+
+ confStr := `
+[markup]
+[markup.goldmark]
+[markup.goldmark.extensions.CJK]
+enable=true
+eastAsianLineBreaks=true
+eastAsianLineBreaksStyle="simple"
+`
+
+ cfg := config.FromTOMLConfigString(confStr)
+ conf := testconfig.GetTestConfig(nil, cfg)
+
+ b := convert(c, conf, content)
+ got := string(b.Bytes())
+
+ c.Assert(got, qt.Contains, "<p>私は太郎です。\nProgramming が好きで、運動が苦手です。</p>\n")
+}
+
+func TestConvertCJKWithExtensionWithEastAsianLineBreaksOptionWithStyle(t *testing.T) {
+ c := qt.New(t)
+
+ content := `
+私は太郎です。
+Programming が好きで、
+運動が苦手です。
+`
+
+ confStr := `
+[markup]
+[markup.goldmark]
+[markup.goldmark.extensions.CJK]
+enable=true
+eastAsianLineBreaks=true
+eastAsianLineBreaksStyle="css3draft"
+`
+
+ cfg := config.FromTOMLConfigString(confStr)
+ conf := testconfig.GetTestConfig(nil, cfg)
+
+ b := convert(c, conf, content)
+ got := string(b.Bytes())
+
+ c.Assert(got, qt.Contains, "<p>私は太郎です。Programming が好きで、運動が苦手です。</p>\n")
+}
+
func TestConvertCJKWithExtensionWithEscapedSpaceOption(t *testing.T) {
c := qt.New(t)