Browse Source
Merge pull request #5175 from abpframework/fix/root-namespace-regex
Escaped dot twice in parseNamespace regex
pull/5176/head
Bunyamin Coskuner
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
npm/ng-packs/packages/schematics/src/utils/namespace.ts
|
|
|
@ -8,8 +8,8 @@ export function parseNamespace(solution: string, type: string) { |
|
|
|
.join('.'); |
|
|
|
|
|
|
|
solution.split('.').reduceRight((acc, part) => { |
|
|
|
acc = `${part}\.${acc}`; |
|
|
|
const regex = new RegExp(`^${acc}(Controllers\.)?`); |
|
|
|
acc = `${part}\\.${acc}`; |
|
|
|
const regex = new RegExp(`^${acc}(Controllers\\.)?`); |
|
|
|
namespace = namespace.replace(regex, ''); |
|
|
|
return acc; |
|
|
|
}, ''); |
|
|
|
|