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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dbd5aea414046c022dca2c76a39b03469e284b3e40e5f466d45cc2095b872426
|
|
4
|
+
data.tar.gz: 549058e3a8f7d02fa187cc49764c674894bbf8853ec1aca87de367320f8a3700
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 247065b32df801e9e0d4b01b66ca3e9ce3c17840eb7209f61d0717df322e84ef0996b1de3d706990b774733f3018e5dc8fb0c4f36a320ca8f2b94b5732163748
|
|
7
|
+
data.tar.gz: 31e0342c3793206c94478852cec92e31f4274aca78f69ed64b7ad2e79a39b66b6e68e326e22e5b38e9f8ecd2c69e38e4942a2939b7175a3869b7d73dcc273a8a
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
286
|
-
|
|
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
|
data/lib/relaton/bib/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bibtex-ruby
|