Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Oct 9, 2023
1 parent 009263b commit 84b58e1
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 220 deletions.
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def schema_version
end

def clean_exit
@novalid or @log.write("#{@output_dir}#{@filename}.err")
@novalid or @log.write("#{@output_dir}#{@filename}.err.html")
@files_to_delete.each { |f| FileUtils.rm f }
end

Expand Down
8 changes: 3 additions & 5 deletions lib/metanorma/standoc/merge_bibitems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def merge1(old, new)
end

def merge_simple(old, new, field)
new[field].blank? and return
(new[field].nil? || new[field].empty?) and return
old[field] = new[field]
end

Expand Down Expand Up @@ -77,12 +77,10 @@ def merge_relations(old, new)
# @old.field is an array, overwrite only those array elements
# where @old.field[attribute] = @new.field[attribute]
def merge_by_type(old, new, field, attributes, opt = {})
new.nil? || new[field].blank? and return
new.nil? || new[field].nil? || new[field].empty? and return
old.nil? and return new[field]
if !old[field].is_a?(::Array) || old[field].empty?
!old[field].is_a?(::Array) || old[field].empty? and
return old[field] = new[field]
end

old[field] = merge_by_type1(old, new, field, attributes, opt)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/standoc/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ def versioned(mod, flavour)
end

module Standoc
VERSION = "2.6.0".freeze
VERSION = "2.6.1".freeze
end
end
4 changes: 2 additions & 2 deletions spec/metanorma/biblio_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1133,14 +1133,14 @@
doi: span:uri.doi[10.1016/j.cities.2022.103905].
INPUT
FileUtils.rm_f "test.xml"
FileUtils.rm_f "test.err"
FileUtils.rm_f "test.err.html"
begin
expect do
Asciidoctor.convert(input, *OPTIONS)
end.to raise_error(SystemExit)
rescue SystemExit, RuntimeError
end
expect(File.read("test.err"))
expect(File.read("test.err.html"))
.to include "Missing surname: issue with bibliographic markup in " \
"\"The adoption of urban digital twins\""
expect(File.exist?("test.xml")).to be false
Expand Down
Loading

0 comments on commit 84b58e1

Please sign in to comment.