lib/metanorma/collection_fileprocess.rb in metanorma-1.3.6 vs lib/metanorma/collection_fileprocess.rb in metanorma-1.3.7
- old
+ new
@@ -26,13 +26,13 @@
add_document_suffix(identifier, xml)
files[identifier][:anchors] = read_anchors(xml)
files[identifier][:bibdata] = xml.at(ns("//bibdata"))
end
files[identifier][:bibitem] = files[identifier][:bibdata].dup
- files[identifier][:bibitem].name = "bibitem"
- files[identifier][:bibitem]["hidden"] = "true"
- files[identifier][:bibitem]&.at("./*[local-name() = 'ext']")&.remove
+ files[identifier][:bibitem].name = "bibitem"
+ files[identifier][:bibitem]["hidden"] = "true"
+ files[identifier][:bibitem]&.at("./*[local-name() = 'ext']")&.remove
end
add_section_split(files)
end
def add_section_split(files)
@@ -44,14 +44,12 @@
rel_path: f1[:url], out_path: File.basename(f1[:url]),
anchors: read_anchors(Nokogiri::XML(File.read(f1[:url]))),
bibdata: files[k][:bibdata], ref: f1[:url] }
m[k + f1[:title]][:bare] = true unless i.zero?
end
- m[k] = files[k]
- else
- m[k] = files[k]
end
+ m[k] = files[k]
end
end
def sectionsplit(file)
Compile.new.compile(
@@ -158,11 +156,11 @@
fn = File.basename(filename).sub(/(?<=\.)[^.]+$/, ext.to_s)
if /html$/.match?(ext) && @files[identifier][:sectionsplit]
# file_sectionsplit_copy(file, fn, identifier, ext, e)
else
FileUtils.cp file.path.sub(/\.xml$/, ".#{ext}"),
- File.join(@outdir, fn)
- @files[identifier][:outputs][e] = File.join(@outdir, fn)
+ File.join(@outdir, fn)
+ @files[identifier][:outputs][e] = File.join(@outdir, fn)
end
end
end
def file_sectionsplit_copy(file, base, identifier, ext, format)