mirror of https://github.com/licensee/licensee.git
anchor copyright regex to start of file
This commit is contained in:
parent
1ac12a180a
commit
2202ad4f46
|
@ -6,7 +6,7 @@ module Licensee
|
|||
|
||||
# rubocop:disable Metrics/LineLength
|
||||
COPYRIGHT_SYMBOLS = Regexp.union([/copyright/i, /\(c\)/i, "\u00A9", "\xC2\xA9"])
|
||||
REGEX = /^\s*#{COPYRIGHT_SYMBOLS}.*$/i
|
||||
REGEX = /\A\s*#{COPYRIGHT_SYMBOLS}.*$/i
|
||||
# rubocop:enable Metrics/LineLength
|
||||
|
||||
def initialize(file)
|
||||
|
|
|
@ -41,7 +41,7 @@ module Licensee
|
|||
|
||||
def attribution
|
||||
@attribution ||= begin
|
||||
matches = /\A#{Matchers::Copyright::REGEX}$/i
|
||||
matches = Matchers::Copyright::REGEX
|
||||
.match(content_without_title_and_version)
|
||||
matches[0] if matches
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue