mirror of
https://github.com/github/choosealicense.com
synced 2024-12-22 04:40:09 +01:00
only look for unknown [] fields in first 1000 charcters
that's where they're likely to be, outside of examples at the end of long licenses still want to check as if there are unknown [] fields in first 1000 characters, might be a field that should be filled in, but wouldn't for lack of correct name
This commit is contained in:
parent
38a3be4898
commit
d5c6d8d746
@ -6,7 +6,7 @@ describe 'license fillable fields' do
|
||||
licenses.each do |license|
|
||||
context "The #{license['title']} license" do
|
||||
it 'should only contain supported fillable fields' do
|
||||
matches = license['content'].scan(/\[([a-z]+)\]/)
|
||||
matches = license['content'][0,1000].scan(/\[([a-z]+)\]/)
|
||||
extra_fields = matches.flatten - (fields.map { |f| f['name'] })
|
||||
expect(extra_fields).to be_empty
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user