Skip to content

Commit 559326f

Browse files
committed
allow readme-to-jsdoc.ts to run on windows (#1157)
thanks, @meetamit! ref. observablehq/plot#1096 (comment)
1 parent 28f1fd5 commit 559326f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/readme-to-jsdoc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import mkdirp from "mkdirp";
77
const readme = readFileSync("./README.md", "utf-8");
88
const docmap = new Map<string, string[]>();
99
let doc: {name: string; lines: string[]} | null = null;
10-
for (const [i, line] of readme.split("\n").entries()) {
10+
for (const [i, line] of readme.split(/\r?\n/).entries()) {
1111
if (/<!--\s*jsdoc/.test(line)) {
1212
let match: RegExpExecArray | null;
1313
if ((match = /^<!--\s+jsdoc\s+(\w+)\s+-->$/.exec(line))) {

0 commit comments

Comments
 (0)