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:
authorJacob Gillespie <jacobwgillespie@gmail.com>2015-01-05 22:00:56 +0300
committerbep <bjorn.erik.pedersen@gmail.com>2015-01-05 23:00:22 +0300
commitc0f54aefe38bc16406a187b3d20b6ffddc70eb04 (patch)
treed7da502b8ab801574973448d0a32791761d88294 /helpers
parenta0e44bb71ddb49816511a40fc97ed66aa021d450 (diff)
Rename to plainIdAnchors
Diffstat (limited to 'helpers')
-rw-r--r--helpers/content.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/helpers/content.go b/helpers/content.go
index 8770c88e7..e8c086a33 100644
--- a/helpers/content.go
+++ b/helpers/content.go
@@ -85,7 +85,9 @@ func GetHtmlRenderer(defaultFlags int, ctx RenderingContext) blackfriday.Rendere
FootnoteReturnLinkContents: viper.GetString("FootnoteReturnLinkContents"),
}
- if m, ok := ctx.ConfigFlags["documentIDAnchor"]; ok && m && len(ctx.DocumentId) != 0 {
+ b := len(ctx.DocumentId) != 0
+
+ if m, ok := ctx.ConfigFlags["plainIdAnchors"]; b && ((ok && !m) || !ok) {
renderParameters.FootnoteAnchorPrefix = ctx.DocumentId + ":" + renderParameters.FootnoteAnchorPrefix
renderParameters.HeaderIDSuffix = ":" + ctx.DocumentId
}