diff --git a/Gemfile.devel b/Gemfile.devel deleted file mode 100644 index 57b99629..00000000 --- a/Gemfile.devel +++ /dev/null @@ -1,2 +0,0 @@ -gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "main" -gem "metanorma-iso", git: "https://github.com/metanorma/metanorma-iso", branch: "main" diff --git a/lib/isodoc/iec/word_convert.rb b/lib/isodoc/iec/word_convert.rb index 90273f27..4ea7dda5 100644 --- a/lib/isodoc/iec/word_convert.rb +++ b/lib/isodoc/iec/word_convert.rb @@ -83,7 +83,7 @@ def word_cleanup(docxml) super end - def make_tr_attr(cell, row, totalrows, header) + def make_tr_attr(cell, row, totalrows, header, bordered) ret = super css_class = cell.name == "th" || header ? "TABLE-col-heading" : "TABLE-cell" @@ -91,9 +91,11 @@ def make_tr_attr(cell, row, totalrows, header) end def tr_parse(node, out, ord, totalrows, header) + c = node.parent.parent["class"] + bordered = %w(modspec).include?(c) || !c out.tr do |r| node.elements.each do |td| - attrs = make_tr_attr(td, ord, totalrows - 1, header) + attrs = make_tr_attr(td, ord, totalrows - 1, header, bordered) attrs[:class] = "TABLE-col-heading" if header r.send td.name, **attr_code(attrs) do |entry| td.children.each { |n| parse(n, entry) } diff --git a/lib/metanorma/iec/isodoc.rng b/lib/metanorma/iec/isodoc.rng index 33b05d9b..1b9c0a6f 100644 --- a/lib/metanorma/iec/isodoc.rng +++ b/lib/metanorma/iec/isodoc.rng @@ -571,6 +571,11 @@ + + + + + @@ -1238,6 +1243,11 @@ + + + + + @@ -2653,7 +2663,7 @@ full short id - modspec + diff --git a/lib/metanorma/iec/version.rb b/lib/metanorma/iec/version.rb index 48c300f5..70131f2e 100644 --- a/lib/metanorma/iec/version.rb +++ b/lib/metanorma/iec/version.rb @@ -1,6 +1,6 @@ module Metanorma module Iec - VERSION = "2.2.0".freeze + VERSION = "2.2.1".freeze end end diff --git a/spec/isodoc/i18n_spec.rb b/spec/isodoc/i18n_spec.rb index aefd4989..e72f974f 100644 --- a/spec/isodoc/i18n_spec.rb +++ b/spec/isodoc/i18n_spec.rb @@ -93,7 +93,7 @@ Foreword

This is a preamble

- 0<tab/>Introduction + Introduction 0.1<tab/>Introduction Subsection

This is patent boilerplate

@@ -159,7 +159,7 @@
-

0  Introduction

+

Introduction

0.1  Introduction Subsection

@@ -312,7 +312,7 @@ Foreword

This is a preamble

- 0<tab/>Introduction + Introduction 0.1<tab/>Introduction Subsection

This is patent boilerplate

@@ -464,7 +464,7 @@ Foreword

This is a preamble

- 0<tab/>Introduction + Introduction 0.1<tab/>Introduction Subsection

This is patent boilerplate

@@ -531,7 +531,7 @@

-

0  Introduction

+

Introduction

0.1  Introduction Subsection

diff --git a/spec/isodoc/postproc_spec.rb b/spec/isodoc/postproc_spec.rb index 9dc8cb1b..a8c0b3ca 100644 --- a/spec/isodoc/postproc_spec.rb +++ b/spec/isodoc/postproc_spec.rb @@ -289,7 +289,7 @@ - +

puts "Hello, world."

diff --git a/spec/isodoc/ref_spec.rb b/spec/isodoc/ref_spec.rb index 8ffc506a..629e1b59 100644 --- a/spec/isodoc/ref_spec.rb +++ b/spec/isodoc/ref_spec.rb @@ -231,105 +231,35 @@

#{IEC_TITLE1} -
-

1  Normative References

-

- The following documents are referred to in the text in such a way that - some or all of their content constitutes requirements of this - document. For dated references, only the edition cited applies. For - undated references, the latest edition of the referenced document - (including any amendments) applies. -

-

- [110], ISO 712, - Cereals and cereal products -

-

- ISO 16634:-- (all parts) - - 1 - - , - Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs -

-

- ISO 20483:2013-2014, - Cereals and pulses -

-

- ICC 167, - Standard No I.C.C 167 - . - - Determination of the protein content in cereal and cereal products - for food and animal feeding stuffs according to the Dumas combustion - method - - (see - http://www.icc.or.at - ) -

-
-

- NOTE -   This is an annotation of ISO 20483:2013-2014 -

+
+

1  Normative References

+

The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.

+

[110], ISO 712, Cereals and cereal products

+

ISO 16634:-- (all parts)1, Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs

+

ISO 20483:2013-2014, Cereals and pulses

+

ICC 167, Standard No I.C.C 167. Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method (see http://www.icc.or.at)

+
+

NOTE  This is an annotation of ISO 20483:2013-2014

-

[5] Title 5

+

[5] Title 5


-

Bibliography

-

- [1]  - Chemicals for analytical laboratory use - . n.p.: n.d. -

-

- [2]  - Instruments for analytical laboratory use - . n.d. -

-
-

- NOTE -   This is an annotation of document ISSN. -

+

Bibliography

+

[1]  Chemicals for analytical laboratory use. n.p.: n.d.

+

[2]  Instruments for analytical laboratory use. n.d.

+
+

NOTE  This is an annotation of document ISSN.

-
-

- NOTE -   This is another annotation of document ISSN. -

+
+

NOTE  This is another annotation of document ISSN.

-

- [3]  ISO 3696, - Water for analytical laboratory use -

-

- [4]  - Standard No I.C.C 167 - . - - Determination of the protein content in cereal and cereal products - for food and animal feeding stuffs according to the Dumas combustion - method - - (see - http://www.icc.or.at - ) -

-

- [5]  IETF RFC 10, - Internet Calendaring and Scheduling Core Object Specification (iCalendar) -

-

- Citn  IETF RFC 20, CitationWorks. 2019. - How to cite a reference - . -

+

[3]  ISO 3696, Water for analytical laboratory use

+

[4]  Standard No I.C.C 167. Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method (see http://www.icc.or.at)

+

[5]  IETF RFC 10, Internet Calendaring and Scheduling Core Object Specification (iCalendar)

+

Citn  IETF RFC 20, CitationWorks. 2019. How to cite a reference.

-
diff --git a/spec/isodoc/section_spec.rb b/spec/isodoc/section_spec.rb index 6bc14ca2..592fd845 100644 --- a/spec/isodoc/section_spec.rb +++ b/spec/isodoc/section_spec.rb @@ -75,7 +75,7 @@ Foreword

This is a preamble

- 0<tab/>Introduction + Introduction 0.1<tab/>Introduction Subsection

This is patent boilerplate

@@ -156,7 +156,7 @@

-

0  Introduction

+

Introduction

0.1  Introduction Subsection

@@ -233,7 +233,7 @@


-

0  Introduction

+

Introduction

0.1  Introduction Subsection

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f63a90c0..1be89830 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -54,6 +54,8 @@ def xmlpp(xml) XSL Nokogiri::XSLT(xsl).transform(Nokogiri::XML(xml, &:noblanks)) .to_xml(indent: 2, encoding: "UTF-8") + .gsub(%r{[^<]+}, "") + .gsub(%r{ schema-version="[^"]+"}, "") end OPTIONS = [backend: :iec, header_footer: true, agree_to_terms: true].freeze