relaton-bib 1.9.5 → 1.9.6
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 +4 -4
- data/README.adoc +12 -0
- data/lib/relaton_bib/bibliographic_item.rb +1 -1
- data/lib/relaton_bib/bibxml_parser.rb +1 -1
- data/lib/relaton_bib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04d616ee7971147c734b6e0520531c4e9b529e76b53c22a98dca1c36b6f49285
|
|
4
|
+
data.tar.gz: 2762c1d26b7a07888c3605939ae18de1b6f2ef44da7f1513dc779e3207ff176f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: beffce777ed3ef33181363edaf57a8e1efced984bcc19ffae88eaa8087a92e48d044b042686dc4b5e6e545f41fe7f67c1eb573abaddc4e056adc439643f0b12a
|
|
7
|
+
data.tar.gz: 44d2809601f70d17db2f5601a29614720fa13a0cfa3fbb1665406e0c4396390862688fc41cbd26de421e19efb5643a61e184b73bf2cb47be567c7aa4788ad4a4
|
data/README.adoc
CHANGED
|
@@ -366,6 +366,18 @@ RelatonBib::BibliographicItem.from_hash hash
|
|
|
366
366
|
...
|
|
367
367
|
----
|
|
368
368
|
|
|
369
|
+
=== Create bibliographic item from BibXML
|
|
370
|
+
|
|
371
|
+
[source,ruby]
|
|
372
|
+
----
|
|
373
|
+
bibxml = File.read "spec/examples/rfc.xml"
|
|
374
|
+
=> <reference anchor=...
|
|
375
|
+
|
|
376
|
+
RelatonBib::BibXMLParser.parse bibxml
|
|
377
|
+
=> #<RelatonBib::BibliographicItem:0x00007f9d0c75b268
|
|
378
|
+
...
|
|
379
|
+
----
|
|
380
|
+
|
|
369
381
|
=== Export bibliographic item to Hash
|
|
370
382
|
|
|
371
383
|
[source,ruby]
|
|
@@ -804,7 +804,7 @@ module RelatonBib
|
|
|
804
804
|
def render_abstract(builder)
|
|
805
805
|
return unless abstract.any?
|
|
806
806
|
|
|
807
|
-
builder.abstract { |xml| xml << abstract[0].content }
|
|
807
|
+
builder.abstract { |xml| xml << abstract[0].content.gsub(/(<\/?)p(>)/, '\1t\2') }
|
|
808
808
|
end
|
|
809
809
|
|
|
810
810
|
# @param [Nokogiri::XML::Builder] builder
|
|
@@ -139,7 +139,7 @@ module RelatonBib
|
|
|
139
139
|
def abstracts(ref)
|
|
140
140
|
ref.xpath("./front/abstract").map do |a|
|
|
141
141
|
FormattedString.new(
|
|
142
|
-
content: a.children.to_s,
|
|
142
|
+
content: a.children.to_s.gsub(/(<\/?)t(>)/, '\1p\2'),
|
|
143
143
|
language: language(ref), script: "Latn", format: "text/html"
|
|
144
144
|
)
|
|
145
145
|
end
|
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: 1.9.
|
|
4
|
+
version: 1.9.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-10-
|
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: byebug
|