Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Does not match bootstrapModule if it contains multiline compilerOptions #10

Open
Swiftwork opened this issue Jul 31, 2017 · 2 comments

Comments

@Swiftwork
Copy link

Line index.js#L3 will not match multiline compilerConfig.

.bootstrapModule(AppModule, {
    defaultEncapsulation: ViewEncapsulation.None,
})

will match

.bootstrapModule(AppModule, { defaultEncapsulation: ViewEncapsulation.None })

Could you update the RegExp to reflect the angular documentation?

@Swiftwork
Copy link
Author

This might work, but needs testing with nested config objects that look similar.

/(\.bootstrapModule|\.bootstrapModuleFactory)\((.+|.+, ?[\[\{][\S\s]*[\]\}])?\)/gm

But a better solution would be to loop though and count opening / closing brackets.

@PatrickJS
Copy link
Owner

can you make a PR and provide a link to regex101.com with examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants