relaton-bib 1.9.5 → 1.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d329cd83e84f6c8c77e88d4d621b15fcfc51e392b037283ba349a428bf317dd
4
- data.tar.gz: 5f68269fd3ac149966bca54f1e472d2fd7ef976dbaa567873561013414b1d3e2
3
+ metadata.gz: 04d616ee7971147c734b6e0520531c4e9b529e76b53c22a98dca1c36b6f49285
4
+ data.tar.gz: 2762c1d26b7a07888c3605939ae18de1b6f2ef44da7f1513dc779e3207ff176f
5
5
  SHA512:
6
- metadata.gz: 776eed6d08cb7580a04a5949a6bd1bb3c729c9d4331eddd3ad8ec8404da1bc0e5df73e296b673549dba74b3e0aa07048f98f98202f2b5351bbc3db4057f090f0
7
- data.tar.gz: ee5864e41161f2990861052e299a03d044ab3305df1a3a940621837c5eae52eafe3ca4e5ea1a8d0b61a3ea2d907b4907b9b16cf4dad213de310061364ec7215a
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
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.9.5".freeze
2
+ VERSION = "1.9.6".freeze
3
3
  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: 1.9.5
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-14 00:00:00.000000000 Z
11
+ date: 2021-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug