relaton-bib 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73e04205cda443de9b4c9f4b5d3ccbb9c62bfb5492c42a977a08ad385e2f3614
4
- data.tar.gz: ea57c9c8ef051e0a9031595a853512c4984b52c4cfaa3e2ef565a19fb080bcd0
3
+ metadata.gz: dbd5aea414046c022dca2c76a39b03469e284b3e40e5f466d45cc2095b872426
4
+ data.tar.gz: 549058e3a8f7d02fa187cc49764c674894bbf8853ec1aca87de367320f8a3700
5
5
  SHA512:
6
- metadata.gz: b5ec1ef76fc6a7739713f0555bb1ed457604dd4d3465ed4108e70cc508ed7096c05dad9b61b6b719ae4318d640af1b46cb445d7c3fd6226ebed4a8123dfb1ffa
7
- data.tar.gz: 7ab3eeef1061507bce7327b82faa10568ec201445b3e0676cec57662183b517915b450a9f92d512b5ba0945f96ffe256a1ca2de5b6cbf2aadf668608424bca1d
6
+ metadata.gz: 247065b32df801e9e0d4b01b66ca3e9ce3c17840eb7209f61d0717df322e84ef0996b1de3d706990b774733f3018e5dc8fb0c4f36a320ca8f2b94b5732163748
7
+ data.tar.gz: 31e0342c3793206c94478852cec92e31f4274aca78f69ed64b7ad2e79a39b66b6e68e326e22e5b38e9f8ecd2c69e38e4942a2939b7175a3869b7d73dcc273a8a
@@ -26,7 +26,7 @@ jobs:
26
26
 
27
27
  - uses: ruby/setup-ruby@v1
28
28
  with:
29
- ruby-version: '3.1'
29
+ ruby-version: '3.2'
30
30
  bundler-cache: true
31
31
 
32
32
  - uses: actions/checkout@v3
@@ -4,7 +4,7 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master, main ]
7
+ branches: [ master, main, lutaml-integration ]
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
@@ -1,3 +1,5 @@
1
+ require "cgi"
2
+
1
3
  module Relaton
2
4
  module Bib
3
5
  module Converter
@@ -138,7 +140,8 @@ module Relaton
138
140
  return [] unless @reference.front.abstract&.t
139
141
 
140
142
  @reference.front.abstract.t.map do |t|
141
- Abstract.new(content: t.content.join, language: "en", script: "Latn")
143
+ text = CGI.escapeHTML(t.content.join.strip)
144
+ Abstract.new(content: "<p>#{text}</p>", language: "en", script: "Latn")
142
145
  end
143
146
  end
144
147
 
@@ -1,3 +1,5 @@
1
+ require "cgi"
2
+
1
3
  module Relaton
2
4
  module Bib
3
5
  module Converter
@@ -282,9 +284,10 @@ module Relaton
282
284
  return unless @item.abstract.any?
283
285
 
284
286
  content = @item.abstract[0].content
285
- Rfcxml::V3::Abstract.new(
286
- t: [Rfcxml::V3::Text.new(content: [content])],
287
- )
287
+ paragraphs = content.scan(%r{<p>(.*?)</p>}m).flatten
288
+ paragraphs = [content] if paragraphs.empty?
289
+ ts = paragraphs.map { |p| Rfcxml::V3::Text.new(content: CGI.unescapeHTML(p)) }
290
+ Rfcxml::V3::Abstract.new(t: ts)
288
291
  end
289
292
 
290
293
  FORMAT_TYPES = %w[TXT HTML PDF XML DOC].freeze
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Bib
3
- VERSION = "2.1.0".freeze
3
+ VERSION = "2.1.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-02 00:00:00.000000000 Z
11
+ date: 2026-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bibtex-ruby