diff options
author | bep <bjorn.erik.pedersen@gmail.com> | 2014-11-28 21:16:57 +0100 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2014-12-26 14:31:55 +0100 |
commit | fbf8bcacc464e9bfbc816fa6d097e6371662ce02 (patch) | |
tree | d193dfa7322d553bc6753cb7e130e2cbd2ea7c6e /hugolib/shortcode.go | |
parent | bb3769822635963c35900fb307520e6bed7ff931 (diff) |
Add configurable support for angled quotes
The flag `HTML_SMARTYPANTS_ANGLED_QUOTES` was added to Blackfriday on Black Friday. This configures rendering of double quotes as angled left and right quotes («
»).
Typical use cases would be either or, or combined, but never in the same
document. As an example would be a person from Norway; he has a blog in both
English and Norwegian (his native tongue); he would then configure Blackfriday
to use angled quotes for the Norwegian section, but keep them as reqular
double quotes for the English.
This commit adds configuration support for this new flag, configuration that can be set in the site configuration, but overridden in page front matter.
Fixes #605
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r-- | hugolib/shortcode.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 9f7508e12..4cf2f84c0 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -212,7 +212,9 @@ func renderShortcode(sc shortcode, tokenizedShortcodes map[string](string), cnt } if sc.doMarkup { - newInner := helpers.RenderBytes([]byte(inner), p.guessMarkupType(), p.UniqueId()) + newInner := helpers.RenderBytes(helpers.RenderingContext{ + Content: []byte(inner), PageFmt: p.guessMarkupType(), + DocumentId: p.UniqueId(), ConfigFlags: p.getRenderingConfigFlags()}) // If the type is “unknown” or “markdown”, we assume the markdown // generation has been performed. Given the input: `a line`, markdown |