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

Fix up vendor regex for bootstrap #6410

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/linguist/vendor.yml
Expand Up @@ -74,7 +74,7 @@
- ([^\s]*)import\.(css|less|scss|styl)$

# Bootstrap css and js
- (^|/)bootstrap([^/.]*)(?=\.).*\.(js|css|less|scss|styl)$
- (^|/)bootstrap([^/.]*)(\..*)?\.(js|css|less|scss|styl)$
- (^|/)custom\.bootstrap([^\s]*)(js|css|less|scss|styl)$

# Font Awesome
Expand Down
5 changes: 5 additions & 0 deletions test/test_file_blob.rb
Expand Up @@ -572,7 +572,12 @@ def test_vendored

# Bootstrap
assert !sample_blob("src/bootstraps/settings.js").vendored?
assert !sample_blob("bootstrap/misc/other/reset.css").vendored?
assert sample_blob("bootstrap-1.4/misc/other/reset.css").vendored?
assert sample_blob("bootstrap.10.4/misc/other/reset.css").vendored?
assert sample_blob("src/bootstrap-5.4.1-beta-dist/js/bundle.js").vendored?
assert sample_blob("src/bootstrap-custom.js").vendored?
assert sample_blob("src/bootstrap-1.4.js").vendored?
assert sample_blob("src/bootstrap-5.4.1-beta-dist/js/bootstrap.bundle.js").vendored?
assert sample_blob("src/bootstrap-5.4.1-beta-dist/js/bootstrap.esm.js").vendored?
assert sample_blob("src/bootstrap-5.4.1-beta-dist/css/bootstrap.rtl.css").vendored?
Expand Down