diff --git a/Gemfile.devel b/Gemfile.devel index 69d8cb93..48b3daa1 100644 --- a/Gemfile.devel +++ b/Gemfile.devel @@ -1 +1,2 @@ -gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "main" +gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "fix/refactor-toWord" +gem "metanorma-standoc", git: "https://github.com/metanorma/metanorma-standoc", branch: "main" diff --git a/lib/isodoc/iso/index.rb b/lib/isodoc/iso/index.rb index 2b748a13..2fa3e4c2 100644 --- a/lib/isodoc/iso/index.rb +++ b/lib/isodoc/iso/index.rb @@ -50,9 +50,8 @@ def index_entries(words, index, primary) ret = index_entries_head(words[primary], index.dig(words[primary], nil, nil), index_entries_opt) - words2 = index[words[primary]]&.keys&.reject do |k| - k.nil? - end&.each_with_object({}) { |w, v| v[w.downcase] = w } + words2 = index[words[primary]]&.keys&.compact + &.each_with_object({}) { |w, v| v[w.downcase] = w } unless words2.empty? ret += "