- Remove an improperly shadowed variable.
- Fixes #741.
var link string = ""
if refUrl.Path != "" {
- var target *Page
-
for _, page := range []*Page(*s.Pages) {
if page.Source.Path() == refUrl.Path || page.Source.LogicalName() == refUrl.Path {
target = page
if refUrl.Fragment != "" {
link = link + "#" + refUrl.Fragment
- if refUrl.Path != "" {
+ if refUrl.Path != "" && target != nil {
link = link + ":" + target.UniqueId()
} else if page != nil {
link = link + ":" + page.UniqueId()