This commit is contained in:
João Moreno
2020-10-12 11:04:19 +02:00
parent c283338f37
commit 47116a8acd
2 changed files with 12 additions and 1 deletions

View File

@@ -679,7 +679,7 @@ export function parseGitmodules(raw: string): Submodule[] {
return;
}
const propertyMatch = /^\s*(\w+)\s+=\s+(.*)$/.exec(line);
const propertyMatch = /^\s*(\w+)\s*=\s*(.*)$/.exec(line);
if (!propertyMatch) {
return;

View File

@@ -184,6 +184,17 @@ suite('git', () => {
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
]);
});
test('whitespace again #108371', () => {
const sample = `[submodule "deps/spdlog"]
path= deps/spdlog
url=https://github.com/gabime/spdlog.git
`;
assert.deepEqual(parseGitmodules(sample), [
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
]);
});
});
suite('parseGitCommit', () => {