isodoc 1.8.3.2 → 2.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -31
- data/Gemfile +0 -1
- data/lib/isodoc/base_style/all.css +9 -0
- data/lib/isodoc/base_style/reset.css +9 -0
- data/lib/isodoc/base_style/reset.scss +11 -0
- data/lib/isodoc/class_utils.rb +18 -6
- data/lib/isodoc/convert.rb +8 -1
- data/lib/isodoc/function/blocks.rb +4 -1
- data/lib/isodoc/function/references.rb +32 -23
- data/lib/isodoc/function/section_titles.rb +6 -1
- data/lib/isodoc/function/to_word_html.rb +3 -3
- data/lib/isodoc/function/utils.rb +13 -14
- data/lib/isodoc/headlesshtml_convert.rb +1 -1
- data/lib/isodoc/html_convert.rb +1 -1
- data/lib/isodoc/html_function/postprocess.rb +9 -2
- data/lib/isodoc/i18n.rb +6 -3
- data/lib/isodoc/pdf_convert.rb +1 -1
- data/lib/isodoc/presentation_function/bibdata.rb +0 -6
- data/lib/isodoc/presentation_function/section.rb +40 -4
- data/lib/isodoc/presentation_function/terms.rb +25 -20
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_sect_gen.rb +7 -3
- data/lib/isodoc/xslfo_convert.rb +1 -5
- data/spec/isodoc/blocks_spec.rb +3 -2
- data/spec/isodoc/postproc_spec.rb +46 -16
- data/spec/isodoc/presentation_xml_spec.rb +208 -37
- data/spec/isodoc/ref_spec.rb +332 -300
- data/spec/isodoc/section_spec.rb +713 -601
- data/spec/isodoc/utils_spec.rb +57 -0
- metadata +7 -6
@@ -0,0 +1,57 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe IsoDoc::ClassUtils do
|
4
|
+
it "cases text" do
|
5
|
+
expect(::IsoDoc::Common.case_strict("ABC CDE", "lowercase", "Hans"))
|
6
|
+
.to eq "ABC CDE"
|
7
|
+
expect(::IsoDoc::Common.case_strict("ABC CDE", "lowercase", "Latn"))
|
8
|
+
.to eq "aBC CDE"
|
9
|
+
expect(::IsoDoc::Common.case_strict("abc cde", "capital", "Latn"))
|
10
|
+
.to eq "Abc cde"
|
11
|
+
expect(::IsoDoc::Common.case_strict("abc cde", "allcaps", "Latn"))
|
12
|
+
.to eq "ABC cde"
|
13
|
+
expect(::IsoDoc::Common.case_strict("ABC CDE", "lowercase", "Hans", firstonly: true))
|
14
|
+
.to eq "ABC CDE"
|
15
|
+
expect(::IsoDoc::Common.case_strict("ABC CDE", "lowercase", "Latn", firstonly: true))
|
16
|
+
.to eq "aBC CDE"
|
17
|
+
expect(::IsoDoc::Common.case_strict("abc cde", "capital", "Latn", firstonly: true))
|
18
|
+
.to eq "Abc cde"
|
19
|
+
expect(::IsoDoc::Common.case_strict("abc cde", "allcaps", "Latn", firstonly: true))
|
20
|
+
.to eq "ABC cde"
|
21
|
+
expect(::IsoDoc::Common.case_strict("ABC CDE", "lowercase", "Hans", firstonly: false))
|
22
|
+
.to eq "ABC CDE"
|
23
|
+
expect(::IsoDoc::Common.case_strict("ABC CDE", "lowercase", "Latn", firstonly: false))
|
24
|
+
.to eq "aBC cDE"
|
25
|
+
expect(::IsoDoc::Common.case_strict("abc cde", "capital", "Latn", firstonly: false))
|
26
|
+
.to eq "Abc Cde"
|
27
|
+
expect(::IsoDoc::Common.case_strict("abc cde", "allcaps", "Latn", firstonly: false))
|
28
|
+
.to eq "ABC CDE"
|
29
|
+
end
|
30
|
+
|
31
|
+
it "cases text with formatting" do
|
32
|
+
expect(::IsoDoc::Common
|
33
|
+
.case_with_markup("<a>ABC</a> CDE", "lowercase", "Hans"))
|
34
|
+
.to eq "<a>ABC</a> CDE"
|
35
|
+
expect(::IsoDoc::Common
|
36
|
+
.case_with_markup("<a>ABC</a> CDE", "lowercase", "Latn"))
|
37
|
+
.to eq "<a>aBC</a> CDE"
|
38
|
+
expect(::IsoDoc::Common
|
39
|
+
.case_with_markup("<a>abc</a> cde", "capital", "Latn"))
|
40
|
+
.to eq "<a>Abc</a> cde"
|
41
|
+
expect(::IsoDoc::Common
|
42
|
+
.case_with_markup("<a>abc</a> cde", "allcaps", "Latn"))
|
43
|
+
.to eq "<a>ABC</a> cde"
|
44
|
+
expect(::IsoDoc::Common
|
45
|
+
.case_with_markup("<a>ABC</a> CDE", "lowercase", "Hans", firstonly: false))
|
46
|
+
.to eq "<a>ABC</a> CDE"
|
47
|
+
expect(::IsoDoc::Common
|
48
|
+
.case_with_markup("<a>ABC</a> CDE", "lowercase", "Latn", firstonly: false))
|
49
|
+
.to eq "<a>aBC</a> cDE"
|
50
|
+
expect(::IsoDoc::Common
|
51
|
+
.case_with_markup("<a>abc</a> cde", "capital", "Latn", firstonly: false))
|
52
|
+
.to eq "<a>Abc</a> Cde"
|
53
|
+
expect(::IsoDoc::Common
|
54
|
+
.case_with_markup("<a>abc</a> cde", "allcaps", "Latn", firstonly: false))
|
55
|
+
.to eq "<a>ABC</a> CDE"
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -509,6 +509,7 @@ files:
|
|
509
509
|
- spec/isodoc/section_spec.rb
|
510
510
|
- spec/isodoc/table_spec.rb
|
511
511
|
- spec/isodoc/terms_spec.rb
|
512
|
+
- spec/isodoc/utils_spec.rb
|
512
513
|
- spec/isodoc/xref_numbering_spec.rb
|
513
514
|
- spec/isodoc/xref_spec.rb
|
514
515
|
- spec/isodoc/xslfo_convert_spec.rb
|
@@ -517,7 +518,7 @@ homepage: https://github.com/metanorma/isodoc
|
|
517
518
|
licenses:
|
518
519
|
- BSD-2-Clause
|
519
520
|
metadata: {}
|
520
|
-
post_install_message:
|
521
|
+
post_install_message:
|
521
522
|
rdoc_options: []
|
522
523
|
require_paths:
|
523
524
|
- lib
|
@@ -532,8 +533,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
532
533
|
- !ruby/object:Gem::Version
|
533
534
|
version: '0'
|
534
535
|
requirements: []
|
535
|
-
rubygems_version: 3.
|
536
|
-
signing_key:
|
536
|
+
rubygems_version: 3.2.32
|
537
|
+
signing_key:
|
537
538
|
specification_version: 4
|
538
539
|
summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.
|
539
540
|
test_files: []
|