Skip to content

Commit

Permalink
use Asciidoc for termdef boilerplate: metanorma/metanorma-iec#339
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Aug 29, 2024
1 parent f2e8bf0 commit cf4da9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/metanorma/standoc/cleanup_boilerplate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def unwrap_boilerplate_clauses(xmldoc, xpath)

def boilerplate_cleanup(xmldoc)
isodoc = boilerplate_isodoc(xmldoc) or return
term_children_cleanup(xmldoc)
termdef_boilerplate_cleanup(xmldoc)
termdef_boilerplate_insert(xmldoc, isodoc)
unwrap_boilerplate_clauses(xmldoc, self.class::TERM_CLAUSE)
Expand Down
4 changes: 2 additions & 2 deletions lib/metanorma/standoc/term_lookup_cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Metanorma
module Standoc
# Intelligent term lookup xml modifier
class TermLookupCleanup
AUTO_GEN_ID_REGEXP = /\A_/.freeze
AUTO_GEN_ID_REGEXP = /\A_/

attr_reader :xmldoc, :lookup, :log

Expand Down Expand Up @@ -130,7 +130,7 @@ def remove_missing_ref_msg(node, target, type)
end

def remove_missing_ref_msg1(_node, target, ret)
target2 = "_#{target.downcase.gsub('-', '_')}"
target2 = "_#{target.downcase.tr('-', '_')}"
if @terms_tags[target] || @terms_tags[target2]
ret.strip!
ret += ". Did you mean to point to a subterm?"
Expand Down
2 changes: 1 addition & 1 deletion spec/metanorma/validate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@
rescue SystemExit
end
expect(File.read("test.err.html"))
.to include(%(Term reference to <code>Terms-and-Definitions</code> missing: "Terms-and-Definitions" is not defined in document.​ Did you mean to point to a subterm))
.to include(%(Term reference to <code>Terms-and-Definitions</code> missing: "Terms-and-Definitions" is not defined in document))
expect(File.read("test.err.html"))
.to include("Concept term1 is pointing to jkl, which is not a term or symbol. Did you mean to point to a subterm?")
expect(File.read("test.err.html"))
Expand Down

0 comments on commit cf4da9e

Please sign in to comment.