lib/stepmod/utils/stepmod_file_annotator.rb in stepmod-utils-0.4.10 vs lib/stepmod/utils/stepmod_file_annotator.rb in stepmod-utils-0.4.11
- old
+ new
@@ -164,39 +164,39 @@
figures = description.xpath("figure")
tables = description.xpath("table")
converted_description = <<~DESCRIPTION
- #{Stepmod::Utils::SmrlDescriptionConverter.convert(wrapper, no_notes_examples: true)}
+ #{Stepmod::Utils::SmrlDescriptionConverter.convert(wrapper, no_notes_examples: true, descriptions_file: descriptions_file)}
DESCRIPTION
if description["linkend"].nil?
raise StandardError.new("[stepmod-file-annotator] ERROR: no linkend for #{descriptions_file}!")
end
converted_figures = figures.map do |figure|
Stepmod::Utils::Converters::ExpressFigure
.new
- .convert(figure, schema_and_entity: description["linkend"])
+ .convert(figure, schema_and_entity: description["linkend"], descriptions_file: descriptions_file)
end.join
converted_tables = tables.map do |table|
Stepmod::Utils::Converters::ExpressTable
.new
- .convert(table, schema_and_entity: description["linkend"])
+ .convert(table, schema_and_entity: description["linkend"], descriptions_file: descriptions_file)
end.join
converted_notes = notes.map do |note|
Stepmod::Utils::Converters::ExpressNote
.new
- .convert(note, schema_and_entity: description["linkend"])
+ .convert(note, schema_and_entity: description["linkend"], descriptions_file: descriptions_file)
end.join
converted_examples = examples.map do |example|
Stepmod::Utils::Converters::ExpressExample
.new
- .convert(example, schema_and_entity: description["linkend"])
+ .convert(example, schema_and_entity: description["linkend"], descriptions_file: descriptions_file)
end.join
[
converted_description,
converted_figures,
@@ -356,9 +356,10 @@
"\n" + Stepmod::Utils::SmrlResourceConverter.convert(
wrapper,
{
no_notes_examples: false,
schema_and_entity: linked,
+ descriptions_file: descriptions_file,
},
)
end
end