There was an error while loading. Please reload this page.
1 parent e2f8664 commit 0abdeeeCopy full SHA for 0abdeee
source/file.go
@@ -155,7 +155,7 @@ func (sp SourceSpec) NewFile(relpath string) *File {
155
}
156
157
f.section = helpers.GuessSection(f.Dir())
158
- f.uniqueID = helpers.Md5String(f.Path())
+ f.uniqueID = helpers.Md5String(filepath.ToSlash(f.relpath))
159
160
return f
161
source/file_test.go
@@ -37,6 +37,11 @@ func TestFileUniqueID(t *testing.T) {
37
f4 := ss.NewFile(filepath.FromSlash("test2/index.md"))
38
39
assert.NotEqual(t, f3.UniqueID(), f4.UniqueID())
40
+
41
+ f5l := ss.NewFile("test3/index.md")
42
+ f5w := ss.NewFile(filepath.FromSlash("test3/index.md"))
43
44
+ assert.Equal(t, f5l.UniqueID(), f5w.UniqueID())
45
46
47
func TestFileString(t *testing.T) {
0 commit comments