Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/relaton/cli/yaml_convertor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def to_xml(file, options = {})
# @return [RelatonBib::BibliographicItem,
# RelatonIso::IsoBiblioraphicItem]
def convert_single_file(content)
if (processor = Registry.instance.by_type(doctype(content["docid"])))
flavor = content.dig("ext", "flavor") || doctype(content["docid"])
if (processor = Registry.instance.by_type(flavor))
processor.hash_to_bib content
else
RelatonBib::BibliographicItem.new(
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/relaton_yaml2html_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RSpec.describe "Relaton yaml2html" do
describe "relaton yaml2html" do
it "convers the yaml file to html" do
it "converts the yaml file to html" do
allow(Relaton::Cli::YAMLConvertor).to receive(:to_html)
command = %w(yaml2html samplenew.yaml style.css templates)

Expand Down