diff options
author | Jacob Gillespie <jacobwgillespie@gmail.com> | 2015-01-05 22:00:56 +0300 |
---|---|---|
committer | bep <bjorn.erik.pedersen@gmail.com> | 2015-01-05 23:00:22 +0300 |
commit | c0f54aefe38bc16406a187b3d20b6ffddc70eb04 (patch) | |
tree | d7da502b8ab801574973448d0a32791761d88294 /helpers | |
parent | a0e44bb71ddb49816511a40fc97ed66aa021d450 (diff) |
Rename to plainIdAnchors
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/content.go | 4 |
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 } |