Fixed section labels causing panic on windows.

The filename path was being split using a unix specific path seperator.  This fix uses the os.PathSeperator to ensure proper evaluation regardless of platform.
This commit is contained in:
Noah Campbell 2013-08-01 13:27:07 -07:00
parent 61258858af
commit c9a09418e7

View file

@ -91,7 +91,7 @@ func initializePage(filename string) (page Page) {
}
func (p *Page) setSection() {
x := strings.Split(p.FileName, "/")
x := strings.Split(p.FileName, string(os.PathSeparator))
if section := x[len(x)-2]; section != "content" {
p.Section = section