Skip to content

Commit

Permalink
fix: generate correct URLs on Windows (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 authored Oct 13, 2020
1 parent 9f92ba6 commit 314de1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DocsParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ export class DocsParser {
isClass: boolean;
}[]
> {
const relativeDocsPath = path.relative(this.baseElectronDir, filePath).split('.')[0];
// Ensure POSIX-style path separators regardless of OS
const relativeDocsPath = path
.relative(this.baseElectronDir, filePath)
.split(path.sep)
.join(path.posix.sep)
.split('.')[0];
const isStructure = relativeDocsPath.includes('structures');
const headings = headingsAndContent(tokens);
expect(headings).to.not.have.lengthOf(
Expand Down

0 comments on commit 314de1c

Please sign in to comment.