Skip to content

Commit

Permalink
Merge pull request #824 from metanorma/fix/ref_prefixing
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis authored Oct 17, 2023
2 parents 448d8ed + 570ba4a commit b198437
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 357 deletions.
4 changes: 4 additions & 0 deletions Gemfile.devel
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
gem "metanorma", git: "https://github.com/metanorma/metanorma", branch: "fix/propagate_output_formats"



1 change: 1 addition & 0 deletions lib/metanorma/standoc/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def html_path(file)
end

def output(isodoc_node, inname, outname, format, options = {})
options_preprocess(options)
case format
when :html
options = options
Expand Down
6 changes: 6 additions & 0 deletions lib/metanorma/standoc/ref_queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ def fetch_ref(xml, code, year, **opts)
nil
end

def supply_ref_prefix(ret)
ret
end

def fetch_ref1(code, year, opts)
code = supply_ref_prefix(code)
if opts[:localfile]
@local_bibdb.get(code, opts[:localfile])
else @bibdb&.fetch(code, year, opts)
Expand All @@ -156,6 +161,7 @@ def unfetchable_ref_code?(ref)
end

def fetch_ref_async(ref, idx, res)
ref[:code] &&= supply_ref_prefix(ref[:code])
if unfetchable_ref_code?(ref)
res << [ref, idx, nil]
idx += 1
Expand Down
198 changes: 9 additions & 189 deletions spec/vcr_cassettes/iev_103-01-02.yml

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions spec/vcr_cassettes/isobib_get_123.yml

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions spec/vcr_cassettes/isobib_get_123_2001_and_iev.yml

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions spec/vcr_cassettes/isobib_get_123_2001a.yml

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions spec/vcr_cassettes/isobib_get_124.yml

Large diffs are not rendered by default.

99 changes: 14 additions & 85 deletions spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions spec/vcr_cassettes/std-link.yml

Large diffs are not rendered by default.

0 comments on commit b198437

Please sign in to comment.