Make ref and relref respect plainIdAnchors

Fixes #813
This commit is contained in:
bep
2015-01-21 14:35:33 +01:00
parent e5be592ee0
commit 1cc6386937
2 changed files with 8 additions and 4 deletions

View File

@@ -186,9 +186,9 @@ func (s *SiteInfo) refLink(ref string, page *Page, relative bool) (string, error
if refUrl.Fragment != "" {
link = link + "#" + refUrl.Fragment
if refUrl.Path != "" && target != nil {
if refUrl.Path != "" && target != nil && !target.isRenderingFlagEnabled("plainIdAnchors") {
link = link + ":" + target.UniqueId()
} else if page != nil {
} else if page != nil && !page.isRenderingFlagEnabled("plainIdAnchors") {
link = link + ":" + page.UniqueId()
}
}