Skip to content

Commit 9ba55e7

Browse files
committed
Revert "fix(build): exclude errors content on Windows"
Deployment and CI are POSIX, where the errors filter already works; the Windows-only failure predates the sync (upstream #6214) and does not affect production. Keep this translation-sync PR scoped to the upstream merge; the Windows path fix will be proposed upstream instead. This reverts commit 0123ec4.
1 parent 0123ec4 commit 9ba55e7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/pages/[[...markdownPath]].js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export async function getStaticPaths() {
150150
const res = resolve(dir, subdir);
151151
return (await stat(res)).isDirectory()
152152
? getFiles(res)
153-
: res.slice(rootDir.length + 1).replace(/\\/g, '/');
153+
: res.slice(rootDir.length + 1);
154154
})
155155
);
156156
return (
@@ -164,7 +164,7 @@ export async function getStaticPaths() {
164164
// 'foo/bar/baz.md' -> ['foo', 'bar', 'baz']
165165
// 'foo/bar/qux/index.md' -> ['foo', 'bar', 'qux']
166166
function getSegments(file) {
167-
let segments = file.slice(0, -3).split('/');
167+
let segments = file.slice(0, -3).replace(/\\/g, '/').split('/');
168168
if (segments[segments.length - 1] === 'index') {
169169
segments.pop();
170170
}

0 commit comments

Comments
 (0)