Rename to plainIdAnchors

This commit is contained in:
Jacob Gillespie
2015-01-05 13:00:56 -06:00
committed by bep
parent a0e44bb71d
commit c0f54aefe3
3 changed files with 6 additions and 4 deletions

View File

@@ -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
}