Add config options: disable footnote anchor prefix and header ID suffix

New config options:

* DisableFootnoteAnchorPrefix - bool - default: false
* DisableHeaderIDSuffix - bool - default: false
This commit is contained in:
Jacob Gillespie
2015-01-04 11:27:09 -06:00
committed by bep
parent dca6eabaca
commit b7716948bc
2 changed files with 6 additions and 1 deletions

View File

@@ -85,8 +85,11 @@ func GetHtmlRenderer(defaultFlags int, ctx RenderingContext) blackfriday.Rendere
FootnoteReturnLinkContents: viper.GetString("FootnoteReturnLinkContents"),
}
if len(ctx.DocumentId) != 0 {
if len(ctx.DocumentId) != 0 && !viper.GetBool("DisableFootnoteAnchorPrefix") {
renderParameters.FootnoteAnchorPrefix = ctx.DocumentId + ":" + renderParameters.FootnoteAnchorPrefix
}
if len(ctx.DocumentId) != 0 && !viper.GetBool("DisableHeaderIDSuffix") {
renderParameters.HeaderIDSuffix = ":" + ctx.DocumentId
}