metanorma-iso 1.10.6 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +26 -0
- data/Makefile +1 -1
- data/lib/asciidoctor/iso/base.rb +2 -69
- data/lib/asciidoctor/iso/cleanup.rb +2 -175
- data/lib/asciidoctor/iso/converter.rb +2 -17
- data/lib/asciidoctor/iso/deprecated.rb +5 -0
- data/lib/asciidoctor/iso/front.rb +2 -169
- data/lib/asciidoctor/iso/front_id.rb +2 -224
- data/lib/asciidoctor/iso/section.rb +2 -48
- data/lib/asciidoctor/iso/validate.rb +2 -171
- data/lib/asciidoctor/iso/validate_image.rb +2 -96
- data/lib/asciidoctor/iso/validate_requirements.rb +2 -110
- data/lib/asciidoctor/iso/validate_section.rb +2 -246
- data/lib/asciidoctor/iso/validate_style.rb +2 -169
- data/lib/asciidoctor/iso/validate_title.rb +2 -104
- data/lib/isodoc/iso/html/htmlstyle.css +47 -0
- data/lib/isodoc/iso/html/isodoc.css +1326 -0
- data/lib/isodoc/iso/html/isodoc.scss +0 -1
- data/lib/isodoc/iso/html/style-human.css +1015 -0
- data/lib/isodoc/iso/html/style-human.scss +8 -2
- data/lib/isodoc/iso/html/style-iso.css +1042 -0
- data/lib/isodoc/iso/html/style-iso.scss +9 -2
- data/lib/isodoc/iso/html/wordstyle.css +1701 -0
- data/lib/isodoc/iso/html_convert.rb +6 -4
- data/lib/isodoc/iso/iso.amendment.xsl +2142 -1565
- data/lib/isodoc/iso/iso.international-standard.xsl +2142 -1565
- data/lib/isodoc/iso/word_convert.rb +2 -0
- data/lib/metanorma/iso/base.rb +70 -0
- data/lib/{asciidoctor → metanorma}/iso/basicdoc.rng +5 -3
- data/lib/{asciidoctor → metanorma}/iso/biblio.rng +7 -5
- data/lib/{asciidoctor → metanorma}/iso/boilerplate-fr.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iso/boilerplate.xml +0 -0
- data/lib/metanorma/iso/cleanup.rb +176 -0
- data/lib/metanorma/iso/converter.rb +18 -0
- data/lib/metanorma/iso/front.rb +170 -0
- data/lib/metanorma/iso/front_id.rb +225 -0
- data/lib/{asciidoctor → metanorma}/iso/isodoc.rng +98 -1
- data/lib/{asciidoctor → metanorma}/iso/isostandard-amd.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iso/isostandard.rnc +0 -0
- data/lib/{asciidoctor → metanorma}/iso/isostandard.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iso/reqt.rng +0 -0
- data/lib/metanorma/iso/section.rb +49 -0
- data/lib/metanorma/iso/validate.rb +172 -0
- data/lib/metanorma/iso/validate_image.rb +97 -0
- data/lib/metanorma/iso/validate_requirements.rb +111 -0
- data/lib/metanorma/iso/validate_section.rb +248 -0
- data/lib/metanorma/iso/validate_style.rb +170 -0
- data/lib/metanorma/iso/validate_title.rb +105 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma-iso.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/ref_spec.rb +4 -2
- data/spec/isodoc/xref_spec.rb +18 -18
- data/spec/{asciidoctor → metanorma}/amd_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/base_spec.rb +158 -197
- data/spec/{asciidoctor → metanorma}/blank_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/refs_spec.rb +2 -5
- data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/table_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/validate_spec.rb +28 -3
- data/spec/spec_helper.rb +1 -1
- metadata +46 -30
- data/spec/vcr_cassettes/docrels.yml +0 -393
- data/spec/vcr_cassettes/sortrefs.yml +0 -599
@@ -58,15 +58,17 @@ module IsoDoc
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def html_toc_entry(level, header)
|
61
|
-
|
62
|
-
|
61
|
+
content = header.at("./following-sibling::p"\
|
62
|
+
"[@class = 'variant-title-toc']") || header
|
63
|
+
if level == "h1" &&
|
64
|
+
header.parent.at(".//h2#{toc_exclude_class}")
|
63
65
|
<<~HDR
|
64
|
-
<li class="#{level}"><div class="collapse-group"><a href="##{header['id']}">#{header_strip(
|
66
|
+
<li class="#{level}"><div class="collapse-group"><a href="##{header['id']}">#{header_strip(content)}</a></li>
|
65
67
|
<div class="collapse-button"></div></div>
|
66
68
|
HDR
|
67
69
|
else
|
68
70
|
%(<li class="#{level}"><a href="##{header['id']}">\
|
69
|
-
#{header_strip(
|
71
|
+
#{header_strip(content)}</a></li>)
|
70
72
|
end
|
71
73
|
end
|
72
74
|
|