Hugo: `markdownify` no longer produces smartypants

Created on 2 Dec 2019  Â·  5Comments  Â·  Source: gohugoio/hugo

With Hugo >= 0.60.0, when using the markdownify function, we no longer get smartypants.

markup:
  goldmark:
    renderer:
      unsafe:           true
  highlight:
    noClasses:          false
description: Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.

and this in a layout:

<p class="bd-lead">{{ .Page.Params.Description | markdownify }}</p>
diff --git "a/C:\\Users\\xmr\\Desktop\\1.html" "b/C:\\Users\\xmr\\Desktop\\2.html"
index 4519767..a797964 100644
--- "a/C:\\Users\\xmr\\Desktop\\1.html"
+++ "b/C:\\Users\\xmr\\Desktop\\2.html"
@@ -1 +1 @@
-Get started with Bootstrap, the world’s most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.
+Get started with Bootstrap, the world's most popular framework for building responsive, mobile-first sites, with BootstrapCDN and a template starter page.

Bug Upstream

Most helpful comment

@jakejarvis It made it into v1.1.21 just a couple of hours after you posted. Once Hugo's dependency on Goldmark is updated this regression (from Blackfriday's behaviour) should be fixed.

All 5 comments

The typographer extension is enabled by default, but it may behave differently from Blackfriday's. Which I assume will eventually be fixed if it's important enough. I think your example have been discussed.

This looks pretty similar https://github.com/yuin/goldmark/issues/39

According to the author of goldmark, he doesn't use the extension but would welcome PRs to add the functionality. I'm not familiar enough with Go to be able to make the changes or I would.

Looks like this will be fixed in next goldmark release – https://github.com/yuin/goldmark/pull/88 :)

@jakejarvis It made it into v1.1.21 just a couple of hours after you posted. Once Hugo's dependency on Goldmark is updated this regression (from Blackfriday's behaviour) should be fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VoidingWarranties picture VoidingWarranties  Â·  3Comments

kaushalmodi picture kaushalmodi  Â·  3Comments

nikolas picture nikolas  Â·  3Comments

artelse picture artelse  Â·  3Comments

vielmetti picture vielmetti  Â·  3Comments