Fix crossrefs on Windows

Have to convert path slashes to file path slashes before the URL path is compared to a file path.

Fixes #957
This commit is contained in:
bep
2015-03-17 15:38:48 +01:00
parent a044734541
commit e1340c060b
2 changed files with 79 additions and 1 deletions

View File

@@ -172,7 +172,8 @@ func (s *SiteInfo) refLink(ref string, page *Page, relative bool) (string, error
if refURL.Path != "" {
for _, page := range []*Page(*s.Pages) {
if page.Source.Path() == refURL.Path || page.Source.LogicalName() == refURL.Path {
refPath := filepath.FromSlash(refURL.Path)
if page.Source.Path() == refPath || page.Source.LogicalName() == refPath {
target = page
break
}