diff options
-rw-r--r-- | common/paths/pathparser.go | 4 | ||||
-rw-r--r-- | common/paths/pathparser_test.go | 2 | ||||
-rw-r--r-- | hugolib/content_map_page.go | 4 | ||||
-rw-r--r-- | hugolib/hugo_sites.go | 2 | ||||
-rw-r--r-- | hugolib/page__meta.go | 6 | ||||
-rw-r--r-- | hugolib/page__paths.go | 4 | ||||
-rw-r--r-- | source/fileInfo.go | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/common/paths/pathparser.go b/common/paths/pathparser.go index 897edb9b7..f506eb60f 100644 --- a/common/paths/pathparser.go +++ b/common/paths/pathparser.go @@ -359,8 +359,8 @@ func (p *Path) Path() (d string) { return p.norm(p.s) } -// Unmormalized returns the Path with the original case preserved. -func (p *Path) Unmormalized() *Path { +// Unnormalized returns the Path with the original case preserved. +func (p *Path) Unnormalized() *Path { return p.unnormalized } diff --git a/common/paths/pathparser_test.go b/common/paths/pathparser_test.go index 3546b6605..27d0b45e9 100644 --- a/common/paths/pathparser_test.go +++ b/common/paths/pathparser_test.go @@ -93,7 +93,7 @@ func TestParse(t *testing.T) { "Basic text file, mixed case and spaces, unnormalized", "/a/Foo BAR.txt", func(c *qt.C, p *Path) { - pp := p.Unmormalized() + pp := p.Unnormalized() c.Assert(pp, qt.IsNotNil) c.Assert(pp.BaseNameNoIdentifier(), qt.Equals, "Foo BAR") }, diff --git a/hugolib/content_map_page.go b/hugolib/content_map_page.go index 27b37a8fc..1f4cd0880 100644 --- a/hugolib/content_map_page.go +++ b/hugolib/content_map_page.go @@ -1554,7 +1554,7 @@ func (sa *sitePagesAssembler) assembleResources() error { return false, nil } - relPathOriginal := rs.path.Unmormalized().PathRel(ps.m.pathInfo.Unmormalized()) + relPathOriginal := rs.path.Unnormalized().PathRel(ps.m.pathInfo.Unnormalized()) relPath := rs.path.BaseRel(ps.m.pathInfo) var targetBasePaths []string @@ -1759,7 +1759,7 @@ func (sa *sitePagesAssembler) addMissingRootSections() error { seen[section] = true // Try to preserve the original casing if possible. - sectionUnnormalized := p.Unmormalized().Section() + sectionUnnormalized := p.Unnormalized().Section() pth := sa.s.Conf.PathParser().Parse(files.ComponentFolderContent, "/"+sectionUnnormalized+"/_index.md") nn := w.Tree.Get(pth.Base()) diff --git a/hugolib/hugo_sites.go b/hugolib/hugo_sites.go index b40477c02..ef67b1059 100644 --- a/hugolib/hugo_sites.go +++ b/hugolib/hugo_sites.go @@ -502,7 +502,7 @@ func (h *HugoSites) handleDataFile(r *source.File) error { // Crawl in data tree to insert data current = h.data - dataPath := r.FileInfo().Meta().PathInfo.Unmormalized().Dir()[1:] + dataPath := r.FileInfo().Meta().PathInfo.Unnormalized().Dir()[1:] keyParts := strings.Split(dataPath, "/") for _, key := range keyParts { diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go index 7b785abb6..34fd096bd 100644 --- a/hugolib/page__meta.go +++ b/hugolib/page__meta.go @@ -195,7 +195,7 @@ func (p *pageMeta) Name() string { return p.resourcePath } if p.pageConfig.Kind == kinds.KindTerm { - return p.pathInfo.Unmormalized().BaseNameNoIdentifier() + return p.pathInfo.Unnormalized().BaseNameNoIdentifier() } return p.Title() } @@ -742,7 +742,7 @@ func (p *pageMeta) applyDefaultValues() error { case kinds.KindHome: p.pageConfig.Title = p.s.Title() case kinds.KindSection: - sectionName := p.pathInfo.Unmormalized().BaseNameNoIdentifier() + sectionName := p.pathInfo.Unnormalized().BaseNameNoIdentifier() if p.s.conf.PluralizeListTitles { sectionName = flect.Pluralize(sectionName) } @@ -754,7 +754,7 @@ func (p *pageMeta) applyDefaultValues() error { panic("term not set") } case kinds.KindTaxonomy: - p.pageConfig.Title = strings.Replace(p.s.conf.C.CreateTitle(p.pathInfo.Unmormalized().BaseNameNoIdentifier()), "-", " ", -1) + p.pageConfig.Title = strings.Replace(p.s.conf.C.CreateTitle(p.pathInfo.Unnormalized().BaseNameNoIdentifier()), "-", " ", -1) case kinds.KindStatus404: p.pageConfig.Title = "404 Page not found" } diff --git a/hugolib/page__paths.go b/hugolib/page__paths.go index b0d2009e4..6ae68aa25 100644 --- a/hugolib/page__paths.go +++ b/hugolib/page__paths.go @@ -116,8 +116,8 @@ func createTargetPathDescriptor(p *pageState) (page.TargetPathDescriptor, error) pageInfoPage := p.PathInfo() pageInfoCurrentSection := p.CurrentSection().PathInfo() if p.s.Conf.DisablePathToLower() { - pageInfoPage = pageInfoPage.Unmormalized() - pageInfoCurrentSection = pageInfoCurrentSection.Unmormalized() + pageInfoPage = pageInfoPage.Unnormalized() + pageInfoCurrentSection = pageInfoCurrentSection.Unnormalized() } desc := page.TargetPathDescriptor{ diff --git a/source/fileInfo.go b/source/fileInfo.go index 6c67ba407..1d2226994 100644 --- a/source/fileInfo.go +++ b/source/fileInfo.go @@ -130,7 +130,7 @@ func (fi *File) pathToDir(s string) string { } func (fi *File) p() *paths.Path { - return fi.fim.Meta().PathInfo.Unmormalized() + return fi.fim.Meta().PathInfo.Unnormalized() } func NewFileInfoFrom(path, filename string) *File { |