Skip to content

Commit

Permalink
Fixed muteable error
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanAkbar committed Aug 12, 2024
1 parent bff0909 commit 1510ece
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/metanorma/plugin/glossarist/dataset_preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def initialize(config = {})
super
@config = config
@datasets = {}
@title_depth = 2
@title_depth = { value: 2 }
@rendered_bibliographies = {}
end

Expand Down Expand Up @@ -110,7 +110,7 @@ def process_line(document, input_lines, current_line, liquid_doc)
elsif match = current_line.match(GLOSSARIST_BLOCK_REGEX)
process_glossarist_block(document, liquid_doc, input_lines, match)
else
@title_depth = current_line.sub(/ .*$/, "").size if /^==+ \S/.match?(current_line)
@title_depth[:value] = current_line.sub(/ .*$/, "").size if /^==+ \S/.match?(current_line)
liquid_doc.add_content(current_line)
end
end
Expand Down Expand Up @@ -239,7 +239,7 @@ def relative_file_path(document, file_path)

def concept_template(dataset_name, concept_name)
<<~CONCEPT_TEMPLATE
#{"=" * (@title_depth + 1)} {{ #{dataset_name}['#{concept_name}'].term }}
#{"=" * (@title_depth[:value] + 1)} {{ #{dataset_name}['#{concept_name}'].term }}
#{alt_terms(dataset_name, concept_name)}
{{ #{dataset_name}['#{concept_name}']['eng'].definition[0].content }}
Expand Down

0 comments on commit 1510ece

Please sign in to comment.