diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-07-29 10:10:40 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-07-29 10:10:40 +0200 |
commit | cb9dfc2613ae5125cafa450097fb0f62dd3770e7 (patch) | |
tree | b58bac10db0842ef648689dea26c52ae45cb0e09 /helpers/content.go | |
parent | c4a0b6e8abdf9f800fbd7a7f89e9f736edc60431 (diff) |
helpers: Add support for French Guillemets
Fixes #3725
Diffstat (limited to 'helpers/content.go')
-rw-r--r-- | helpers/content.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/content.go b/helpers/content.go index 350d1a685..d84fe27a8 100644 --- a/helpers/content.go +++ b/helpers/content.go @@ -63,6 +63,7 @@ func NewContentSpec(cfg config.Provider) *ContentSpec { // Blackfriday holds configuration values for Blackfriday rendering. type Blackfriday struct { Smartypants bool + SmartypantsQuotesNBSP bool AngledQuotes bool Fractions bool HrefTargetBlank bool @@ -81,6 +82,7 @@ func (c ContentSpec) NewBlackfriday() *Blackfriday { defaultParam := map[string]interface{}{ "smartypants": true, "angledQuotes": false, + "smartypantsQuotesNBSP": false, "fractions": true, "hrefTargetBlank": false, "smartDashes": true, @@ -229,6 +231,10 @@ func (c ContentSpec) getHTMLRenderer(defaultFlags int, ctx *RenderingContext) bl htmlFlags |= blackfriday.HTML_USE_SMARTYPANTS } + if ctx.Config.SmartypantsQuotesNBSP { + htmlFlags |= blackfriday.HTML_SMARTYPANTS_QUOTES_NBSP + } + if ctx.Config.AngledQuotes { htmlFlags |= blackfriday.HTML_SMARTYPANTS_ANGLED_QUOTES } |