diff options
Diffstat (limited to 'lib/banzai/redactor.rb')
-rw-r--r-- | lib/banzai/redactor.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/banzai/redactor.rb b/lib/banzai/redactor.rb index 28928d6f376..7db5f5e1f7d 100644 --- a/lib/banzai/redactor.rb +++ b/lib/banzai/redactor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Banzai # Class for removing Markdown references a certain user is not allowed to # view. @@ -37,7 +39,13 @@ module Banzai all_document_nodes.each do |entry| nodes_for_document = entry[:nodes] - doc_data = { document: entry[:document], visible_reference_count: nodes_for_document.count } + + doc_data = { + document: entry[:document], + total_reference_count: nodes_for_document.count, + visible_reference_count: nodes_for_document.count + } + metadata << doc_data nodes_for_document.each do |node| |