| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent adbd92e commit 3f7c503
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,9 @@ const parseSection = (text, startMarker, endMarker) => { | |||
| 15 | 15 | const match = text.match(regExp); | |
| 16 | 16 | assert(match, | |
| 17 | 17 | `Unable to locate text between '${startMarker}' and '${endMarker}'.`); | |
| 18 | - return match[1].split(/\r?\n/); | ||
| 18 | + return match[1] | ||
| 19 | + .split(/\r?\n/) | ||
| 20 | + .filter((val) => val.trim() !== ''); | ||
| 19 | 21 | }; | |
| 20 | 22 | ||
| 21 | 23 | const nodeOptionsLines = parseSection(cliText, | |
@@ -24,6 +26,7 @@ const nodeOptionsLines = parseSection(cliText, | |||
| 24 | 26 | const v8OptionsLines = parseSection(cliText, | |
| 25 | 27 | '<!-- node-options-v8 start -->', | |
| 26 | 28 | '<!-- node-options-v8 end -->'); | |
| 29 | + | ||
| 27 | 30 | // Check the options are documented in alphabetical order. | |
| 28 | 31 | assert.deepStrictEqual(nodeOptionsLines, [...nodeOptionsLines].sort()); | |
| 29 | 32 | assert.deepStrictEqual(v8OptionsLines, [...v8OptionsLines].sort()); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments