diff --git a/go.mod b/go.mod index a741ed253..d99cb010b 100644 --- a/go.mod +++ b/go.mod @@ -52,7 +52,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.6.1 github.com/tdewolff/minify/v2 v2.7.0 - github.com/yuin/goldmark v1.1.20 + github.com/yuin/goldmark v1.1.21 github.com/yuin/goldmark-highlighting v0.0.0-20191202084645-78f32c8dd6d5 go.opencensus.io v0.22.0 // indirect gocloud.dev v0.15.0 diff --git a/go.sum b/go.sum index 75bc08962..beb3423c4 100644 --- a/go.sum +++ b/go.sum @@ -405,6 +405,8 @@ github.com/yuin/goldmark v1.1.18 h1:0Gpa+rpkhzQehagonRrmf0h1IHidn5DfSLM6oUjx5EU= github.com/yuin/goldmark v1.1.18/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.20 h1:WZzdEFW2cYKjlc9wvNRh1+t2n7m8h+g0mB0ssg9nzHQ= github.com/yuin/goldmark v1.1.20/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.21 h1:3C7Pl/UmcuHHXd5d4olaBZZnh6A/ci78c90rrihLFc8= +github.com/yuin/goldmark v1.1.21/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark-highlighting v0.0.0-20191202084645-78f32c8dd6d5 h1:QbH7ca1qtgZHrzvcVAEoiJIwBqrXxMOfHYfwZIniIK0= github.com/yuin/goldmark-highlighting v0.0.0-20191202084645-78f32c8dd6d5/go.mod h1:4QGn5rJFOASBa2uK4Q2h3BRTyJqRfsAucPFIipSTcaM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= diff --git a/hugolib/page_test.go b/hugolib/page_test.go index 66439a7a5..9bcfc1fc8 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -702,7 +702,7 @@ func TestTableOfContents(t *testing.T) { p := s.RegularPages()[0] - checkPageContent(t, p, "

For some moments the old man did not reply. He stood with bowed head, buried in deep thought. But at last he spoke.

AA

I have no idea, of course, how long it took me to reach the limit of the plain, but at last I entered the foothills, following a pretty little canyon upward toward the mountains. Beside me frolicked a laughing brooklet, hurrying upon its noisy way down to the silent sea. In its quieter pools I discovered many small fish, of four-or five-pound weight I should imagine. In appearance, except as to size and color, they were not unlike the whale of our own seas. As I watched them playing about I discovered, not only that they suckled their young, but that at intervals they rose to the surface to breathe as well as to feed upon certain grasses and a strange, scarlet lichen which grew upon the rocks just above the water line.

AAA

I remember I felt an extraordinary persuasion that I was being played with, that presently, when I was upon the very verge of safety, this mysterious death–as swift as the passage of light–would leap after me from the pit about the cylinder and strike me down. ## BB

BBB

“You're a great Granser,” he cried delightedly, “always making believe them little marks mean something.”

") + checkPageContent(t, p, "

For some moments the old man did not reply. He stood with bowed head, buried in deep thought. But at last he spoke.

AA

I have no idea, of course, how long it took me to reach the limit of the plain, but at last I entered the foothills, following a pretty little canyon upward toward the mountains. Beside me frolicked a laughing brooklet, hurrying upon its noisy way down to the silent sea. In its quieter pools I discovered many small fish, of four-or five-pound weight I should imagine. In appearance, except as to size and color, they were not unlike the whale of our own seas. As I watched them playing about I discovered, not only that they suckled their young, but that at intervals they rose to the surface to breathe as well as to feed upon certain grasses and a strange, scarlet lichen which grew upon the rocks just above the water line.

AAA

I remember I felt an extraordinary persuasion that I was being played with, that presently, when I was upon the very verge of safety, this mysterious death–as swift as the passage of light–would leap after me from the pit about the cylinder and strike me down. ## BB

BBB

“You’re a great Granser,” he cried delightedly, “always making believe them little marks mean something.”

") checkPageTOC(t, p, "") } diff --git a/markup/goldmark/convert_test.go b/markup/goldmark/convert_test.go index 31799b2a5..7714933fd 100644 --- a/markup/goldmark/convert_test.go +++ b/markup/goldmark/convert_test.go @@ -97,6 +97,7 @@ LINE1 * Straight double "quotes" and single 'quotes' into “curly” quote HTML entities * Dashes (“--” and “---”) into en- and em-dash entities * Three consecutive dots (“...”) into an ellipsis entity +* Apostrophes are also converted: "That was back in the '90s, that's a long time ago" ## Footnotes @@ -153,6 +154,7 @@ description c.Assert(got, qt.Contains, `Straight double “quotes” and single ‘quotes’`) c.Assert(got, qt.Contains, `Dashes (“–” and “—”) `) c.Assert(got, qt.Contains, `Three consecutive dots (“…”)`) + c.Assert(got, qt.Contains, `“That was back in the ’90s, that’s a long time ago”`) c.Assert(got, qt.Contains, `footnote.1`) c.Assert(got, qt.Contains, `
`) c.Assert(got, qt.Contains, `
date
`)