summaryrefslogtreecommitdiffstats
path: root/hugolib/hugo_sites_build_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-06 20:10:47 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-11-23 14:12:24 +0100
commitbfb9613a14ab2d93a4474e5486d22e52a9d5e2b3 (patch)
tree81c4dbd10505e952489e1dbcf1d7bafc88b57c28 /hugolib/hugo_sites_build_test.go
parenta3fe5e5e35f311f22b6b4fc38abfcf64cd2c7d6f (diff)
Add Goldmark as the new default markdown handler
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo. If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration: ```toml [markup] defaultMarkdownHandler="blackfriday" ``` Fixes #5963 Fixes #1778 Fixes #6355
Diffstat (limited to 'hugolib/hugo_sites_build_test.go')
-rw-r--r--hugolib/hugo_sites_build_test.go29
1 files changed, 19 insertions, 10 deletions
diff --git a/hugolib/hugo_sites_build_test.go b/hugolib/hugo_sites_build_test.go
index 1a690cdd9..03853bff6 100644
--- a/hugolib/hugo_sites_build_test.go
+++ b/hugolib/hugo_sites_build_test.go
@@ -671,7 +671,7 @@ END
b.CreateSites().Build(BuildCfg{})
- contentMatchers := []string{"<h2 id=\"another-header\">Another header</h2>", "<h2 id=\"another-header-99\">Another header</h2>", "<p>The End.</p>"}
+ contentMatchers := []string{"<h2 id=\"another-header\">Another header</h2>", "<h2 id=\"another-header99\">Another header</h2>", "<p>The End.</p>"}
for i := 1; i <= numPages; i++ {
if i%3 != 0 {
@@ -691,13 +691,13 @@ END
checkContent(b, fmt.Sprintf("public/%s/page%d/index.json", section, i), contentMatchers...)
}
- checkContent(b, "public/s1/index.html", "P: s1/_index.md\nList: 10|List Content: 8335\n\n\nL1: 500 L2: 5\n\nRender 0: View: 8335\n\nRender 1: View: 8335\n\nRender 2: View: 8335\n\nRender 3: View: 8335\n\nRender 4: View: 8335\n\nEND\n")
- checkContent(b, "public/s2/index.html", "P: s2/_index.md\nList: 10|List Content: 8335", "Render 4: View: 8335\n\nEND")
- checkContent(b, "public/index.html", "P: _index.md\nList: 10|List Content: 8335", "4: View: 8335\n\nEND")
+ checkContent(b, "public/s1/index.html", "P: s1/_index.md\nList: 10|List Content: 8033\n\n\nL1: 500 L2: 5\n\nRender 0: View: 8033\n\nRender 1: View: 8033\n\nRender 2: View: 8033\n\nRender 3: View: 8033\n\nRender 4: View: 8033\n\nEND\n")
+ checkContent(b, "public/s2/index.html", "P: s2/_index.md\nList: 10|List Content: 8033", "Render 4: View: 8033\n\nEND")
+ checkContent(b, "public/index.html", "P: _index.md\nList: 10|List Content: 8033", "4: View: 8033\n\nEND")
// Check paginated pages
for i := 2; i <= 9; i++ {
- checkContent(b, fmt.Sprintf("public/page/%d/index.html", i), fmt.Sprintf("Page: %d", i), "Content: 8335\n\n\nL1: 500 L2: 5\n\nRender 0: View: 8335", "Render 4: View: 8335\n\nEND")
+ checkContent(b, fmt.Sprintf("public/page/%d/index.html", i), fmt.Sprintf("Page: %d", i), "Content: 8033\n\n\nL1: 500 L2: 5\n\nRender 0: View: 8033", "Render 4: View: 8033\n\nEND")
}
}
@@ -977,7 +977,10 @@ enableRobotsTXT = true
[permalinks]
other = "/somewhere/else/:filename"
-[blackfriday]
+# TODO(bep)
+[markup]
+ defaultMarkdownHandler = "blackfriday"
+[markup.blackfriday]
angledQuotes = true
[Taxonomies]
@@ -1035,7 +1038,10 @@ enableRobotsTXT: true
permalinks:
other: "/somewhere/else/:filename"
-blackfriday:
+# TODO(bep)
+markup:
+ defaultMarkdownHandler: blackfriday
+ blackFriday:
angledQuotes: true
Taxonomies:
@@ -1093,9 +1099,12 @@ var multiSiteJSONConfigTemplate = `
"permalinks": {
"other": "/somewhere/else/:filename"
},
- "blackfriday": {
- "angledQuotes": true
- },
+ "markup": {
+ "defaultMarkdownHandler": "blackfriday",
+ "blackfriday": {
+ "angledQuotes": true
+ }
+ },
"Taxonomies": {
"tag": "tags"
},