aboutsummaryrefslogtreecommitdiff
path: root/_plugins/linter.rb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--_plugins/linter.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb
index d0329cc..5281985 100644
--- a/_plugins/linter.rb
+++ b/_plugins/linter.rb
@@ -8,20 +8,19 @@ module Jekyll
safe true
priority :high
- @@known_ids = Set[]
-
def insert_id(name, document)
lang = document.data['lang']
ref = document.data['ref']
id = "#{name}:#{lang}:#{ref}"
- if @@known_ids.include? id then
+ if @known_ids.include? id then
raise "Duplicate ID found: '#{id}'"
else
- @@known_ids.add id
+ @known_ids.add id
end
end
def assert_unique_ids(site)
+ @known_ids = Set[]
site.collections.each do |name, collection|
collection.docs.each do |document|
unless document.data['generated'] then