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
}
"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")
},
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
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())
// 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 {
return p.resourcePath
}
if p.pageConfig.Kind == kinds.KindTerm {
- return p.pathInfo.Unmormalized().BaseNameNoIdentifier()
+ return p.pathInfo.Unnormalized().BaseNameNoIdentifier()
}
return p.Title()
}
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)
}
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"
}
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{
}
func (fi *File) p() *paths.Path {
- return fi.fim.Meta().PathInfo.Unmormalized()
+ return fi.fim.Meta().PathInfo.Unnormalized()
}
func NewFileInfoFrom(path, filename string) *File {