Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rw-r--r--helpers/content.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/content.go b/helpers/content.go
index 847d4dcbc..b42efaefe 100644
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -45,6 +45,7 @@ type Blackfriday struct {
AngledQuotes bool
Fractions bool
HrefTargetBlank bool
+ SmartDashes bool
LatexDashes bool
PlainIDAnchors bool
Extensions []string
@@ -58,6 +59,7 @@ func NewBlackfriday() *Blackfriday {
AngledQuotes: false,
Fractions: true,
HrefTargetBlank: false,
+ SmartDashes: true,
LatexDashes: true,
PlainIDAnchors: false,
}
@@ -169,6 +171,10 @@ func GetHTMLRenderer(defaultFlags int, ctx *RenderingContext) blackfriday.Render
htmlFlags |= blackfriday.HTML_HREF_TARGET_BLANK
}
+ if ctx.getConfig().SmartDashes {
+ htmlFlags |= blackfriday.HTML_SMARTYPANTS_DASHES
+ }
+
if ctx.getConfig().LatexDashes {
htmlFlags |= blackfriday.HTML_SMARTYPANTS_LATEX_DASHES
}