isodoc 1.5.0 → 1.5.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 +11 -41
- data/isodoc.gemspec +1 -0
- data/lib/isodoc/function/inline.rb +1 -1
- data/lib/isodoc/presentation_function/block.rb +6 -0
- data/lib/isodoc/version.rb +1 -1
- data/spec/isodoc/blocks_spec.rb +57 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 691e16d8f19de5c4008d22686af0f70594dea57d039e7d4e265763a02cc8eea3
|
4
|
+
data.tar.gz: 4aca2f6a4b06fa9c6dd3235ee8581e94060f47eb3fe8dc9de9a6b6aa5ee356f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ac28f83694610bab479de1bed5921c3d5807ab337dd2926555b66a7e5c1f5912c320a335089a4c7a617e816f1d8957bf923c986813e3374316ef472f825f7c2
|
7
|
+
data.tar.gz: d472986686451eab5674ce530a2a8fb2a82660d345280ae4ce57425c8920f135a789536ae4d0b05b952a8ea44efcaaf5122bc266cb6f17aee2fb6b4d79d1ca79
|
data/.github/workflows/rake.yml
CHANGED
@@ -16,17 +16,17 @@ jobs:
|
|
16
16
|
strategy:
|
17
17
|
fail-fast: false
|
18
18
|
matrix:
|
19
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
+
ruby: [ '2.7', '2.6', '2.5', '2.4' ]
|
20
20
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
21
|
experimental: [ false ]
|
22
22
|
include:
|
23
|
-
- ruby: '
|
23
|
+
- ruby: '3.0'
|
24
24
|
os: 'ubuntu-latest'
|
25
25
|
experimental: true
|
26
|
-
- ruby: '
|
26
|
+
- ruby: '3.0'
|
27
27
|
os: 'windows-latest'
|
28
28
|
experimental: true
|
29
|
-
- ruby: '
|
29
|
+
- ruby: '3.0'
|
30
30
|
os: 'macos-latest'
|
31
31
|
experimental: true
|
32
32
|
steps:
|
@@ -35,49 +35,19 @@ jobs:
|
|
35
35
|
- uses: ruby/setup-ruby@v1
|
36
36
|
with:
|
37
37
|
ruby-version: ${{ matrix.ruby }}
|
38
|
+
bundler-cache: true
|
38
39
|
|
39
|
-
- uses:
|
40
|
-
with:
|
41
|
-
path: vendor/bundle
|
42
|
-
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
43
|
-
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
44
|
-
|
45
|
-
- run: bundle config set path 'vendor/bundle'
|
46
|
-
|
47
|
-
- run: bundle install --jobs 4 --retry 3
|
48
|
-
|
49
|
-
- name: Install Inkscape macOS
|
50
|
-
if: matrix.os == 'macos-latest'
|
51
|
-
run: |
|
52
|
-
brew cask install inkscape
|
53
|
-
inkscape --version
|
54
|
-
|
55
|
-
- name: Install Inkscape Ubuntu
|
56
|
-
if: matrix.os == 'ubuntu-latest'
|
57
|
-
run: |
|
58
|
-
sudo add-apt-repository ppa:inkscape.dev/stable
|
59
|
-
sudo apt update
|
60
|
-
sudo apt install inkscape
|
61
|
-
inkscape --version
|
62
|
-
|
63
|
-
- name: Install Inkscape Windows
|
64
|
-
if: matrix.os == 'windows-latest'
|
65
|
-
run: |
|
66
|
-
choco install --no-progress -y inkscape
|
67
|
-
inkscape --version
|
40
|
+
- uses: metanorma/metanorma-build-scripts/inkscape-setup-action@master
|
68
41
|
|
69
42
|
- run: bundle exec rake
|
70
43
|
|
71
44
|
tests-passed:
|
72
45
|
needs: rake
|
73
46
|
runs-on: ubuntu-latest
|
74
|
-
continue-on-error: true
|
75
47
|
steps:
|
76
|
-
-
|
77
|
-
uses: Sibz/github-status-action@v1
|
48
|
+
- uses: peter-evans/repository-dispatch@v1
|
78
49
|
with:
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
50
|
+
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
51
|
+
repository: ${{ github.repository }}
|
52
|
+
event-type: notify
|
53
|
+
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
data/isodoc.gemspec
CHANGED
@@ -39,7 +39,7 @@ module IsoDoc::Function
|
|
39
39
|
"uri[@type = 'citation']"))
|
40
40
|
return href unless url
|
41
41
|
href = suffix_url(url.text)
|
42
|
-
anchor = node&.at(ns(".//locality[@type = 'anchor']"))&.text
|
42
|
+
anchor = node&.at(ns(".//locality[@type = 'anchor']"))&.text&.strip
|
43
43
|
anchor and href += "##{anchor}"
|
44
44
|
href
|
45
45
|
end
|
data/lib/isodoc/version.rb
CHANGED
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -2687,7 +2687,7 @@ expect(( File.read("test.html").gsub(%r{^.*<h1 class="ForewordTitle">Foreword</h
|
|
2687
2687
|
expect(File.exist?("test.html.err")).to be true
|
2688
2688
|
end
|
2689
2689
|
|
2690
|
-
it "
|
2690
|
+
it "ignores passthrough with incompatible format" do
|
2691
2691
|
expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2692
2692
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
2693
2693
|
<preface><foreword>
|
@@ -2707,6 +2707,62 @@ expect(( File.read("test.html").gsub(%r{^.*<h1 class="ForewordTitle">Foreword</h
|
|
2707
2707
|
OUTPUT
|
2708
2708
|
end
|
2709
2709
|
|
2710
|
+
it "processes svgmap" do
|
2711
|
+
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~INPUT, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(<<~OUTPUT)
|
2712
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
2713
|
+
<sections>
|
2714
|
+
<svgmap id='_'>
|
2715
|
+
<target href='http://www.example.com'>
|
2716
|
+
<xref target='ref1'>Computer</xref>
|
2717
|
+
</target>
|
2718
|
+
</svgmap>
|
2719
|
+
<figure id='_'>
|
2720
|
+
<image src='action_schemaexpg1.svg' id='_' mimetype='image/svg+xml' height='auto' width='auto'/>
|
2721
|
+
</figure>
|
2722
|
+
<svgmap id='_'>
|
2723
|
+
<figure id='_'>
|
2724
|
+
<image src='action_schemaexpg2.svg' id='_' mimetype='image/svg+xml' height='auto' width='auto' alt='Workmap'/>
|
2725
|
+
</figure>
|
2726
|
+
<target href='mn://support_resource_schema'>
|
2727
|
+
<eref bibitemid='express_action_schema' citeas=''>
|
2728
|
+
<localityStack>
|
2729
|
+
<locality type='anchor'>
|
2730
|
+
<referenceFrom>action_schema.basic</referenceFrom>
|
2731
|
+
</locality>
|
2732
|
+
</localityStack>
|
2733
|
+
Coffee
|
2734
|
+
</eref>
|
2735
|
+
</target>
|
2736
|
+
</svgmap>
|
2737
|
+
</sections>
|
2738
|
+
<bibliography>
|
2739
|
+
<references hidden='true' normative='false'>
|
2740
|
+
<bibitem id='express_action_schema' type='internal'>
|
2741
|
+
<docidentifier type='repository'>express/action_schema</docidentifier>
|
2742
|
+
</bibitem>
|
2743
|
+
</references>
|
2744
|
+
</bibliography>
|
2745
|
+
</iso-standard>
|
2746
|
+
INPUT
|
2747
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
2748
|
+
<sections>
|
2749
|
+
<figure id='_'>
|
2750
|
+
<image src='action_schemaexpg1.svg' id='_' mimetype='image/svg+xml' height='auto' width='auto'/>
|
2751
|
+
</figure>
|
2752
|
+
<figure id='_'>
|
2753
|
+
<image src='action_schemaexpg2.svg' id='_' mimetype='image/svg+xml' height='auto' width='auto' alt='Workmap'/>
|
2754
|
+
</figure>
|
2755
|
+
</sections>
|
2756
|
+
<bibliography>
|
2757
|
+
<references hidden='true' normative='false'>
|
2758
|
+
<bibitem id='express_action_schema' type='internal'>
|
2759
|
+
<docidentifier type='repository'>express/action_schema</docidentifier>
|
2760
|
+
</bibitem>
|
2761
|
+
</references>
|
2762
|
+
</bibliography>
|
2763
|
+
</iso-standard>
|
2764
|
+
OUTPUT
|
2710
2765
|
|
2766
|
+
end
|
2711
2767
|
|
2712
2768
|
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: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|
@@ -304,6 +304,20 @@ dependencies:
|
|
304
304
|
- - "~>"
|
305
305
|
- !ruby/object:Gem::Version
|
306
306
|
version: '0.9'
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: rexml
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - ">="
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '0'
|
314
|
+
type: :development
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - ">="
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: '0'
|
307
321
|
description: |
|
308
322
|
isodoc converts documents in the IsoDoc document model into
|
309
323
|
Microsoft Word and HTML.
|
@@ -454,7 +468,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
454
468
|
- !ruby/object:Gem::Version
|
455
469
|
version: '0'
|
456
470
|
requirements: []
|
457
|
-
rubygems_version: 3.
|
471
|
+
rubygems_version: 3.1.4
|
458
472
|
signing_key:
|
459
473
|
specification_version: 4
|
460
474
|
summary: Convert documents in IsoDoc into Word and HTML in AsciiDoc.
|