GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: fix SplitString to ignore white spaces · nodejs/node@bc09d2f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • util.cc
  • test/parallel
    • test-cli-node-options.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/util.cc‎

Copy file name to clipboardExpand all lines: src/util.cc
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ std::vector<std::string> SplitString(const std::string& in, char delim) {
134134
while (in_stream.good()) {
135135
std::string item;
136136
std::getline(in_stream, item, delim);
137+
if (item.empty()) continue;
137138
out.emplace_back(std::move(item));
138139
}
139140
return out;
Collapse file

‎test/parallel/test-cli-node-options.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cli-node-options.js
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ tmpdir.refresh();
1414
const printA = require.resolve('../fixtures/printA.js');
1515
expect(`-r ${printA}`, 'A\nB\n');
1616
expect(`-r ${printA} -r ${printA}`, 'A\nB\n');
17+
expect(` -r ${printA} -r ${printA}`, 'A\nB\n');
18+
expect(` --require ${printA} --require ${printA}`, 'A\nB\n');
1719
expect('--no-deprecation', 'B\n');
1820
expect('--no-warnings', 'B\n');
1921
expect('--no_warnings', 'B\n');

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.