mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user