diff options
author | EuAndreh <eu@euandre.org> | 2020-12-26 08:07:29 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-12-26 08:07:29 -0300 |
commit | 67d15838914e8cbf86c85b6d94bde8a5bc201e71 (patch) | |
tree | 11e4a8f711ddcc4f5e282e3f7aadfc5e33f52cf9 | |
parent | Fix sh tests (diff) | |
download | euandre.org-67d15838914e8cbf86c85b6d94bde8a5bc201e71.tar.gz euandre.org-67d15838914e8cbf86c85b6d94bde8a5bc201e71.tar.xz |
linter.rb: Remove @@known_ids to allow live reloading to work
Diffstat (limited to '')
-rw-r--r-- | _plugins/linter.rb | 7 |
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 |