suma 0.5.13 → 0.5.14

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: 7b1d6e267c263c780aaa5422e94a23794e238842651735653602b044b617b73d
4
- data.tar.gz: 588bae3d4a1fa65790fcc096b0ced904f0856c8d006bfe1859c5c78016aebdc6
3
+ metadata.gz: c331c83dbf3382e68590173ba797cba15b9fc97c880467795c3febbf95c4292f
4
+ data.tar.gz: d39fe375c581115f2bcbc59eca69801e83865b7dc7d2d0fefc36997815640819
5
5
  SHA512:
6
- metadata.gz: 5771a7aa24c9680995b0248997622bb3b6dd329de29984d43da73b15a048d519a1605d9d2e9b9d95a0f08f8f2d0331eee7d1db21113964171da2af191622fef5
7
- data.tar.gz: 40979e3bbf9c4b4b20392fda30fea22d52edcb2b7c5ae270175826328275db568251912e4fdd02a5e4cdf76149aa83ded7f00ac0eb417f4378f12ae1de885caf
6
+ metadata.gz: c75b7b5d22eeccf6666ef2798de8380978bc86b0bc2a373e58b392108f284c6ee9d5e7207395c8a4ec751f0d2358d931307606b9ef52cc8d379d9084caf72224
7
+ data.tar.gz: 7f7050cb83fc7ccb1b44cbf4186a6e277a6677333ccd06cb845b395118b0be27138eb5436e8b28cef545c08f39391b16da15ab43dcd770267a93aea33e64cb3d
@@ -57,10 +57,24 @@ module Suma
57
57
  notes = only_keep_first_sentence(notes)
58
58
  notes = remove_see_content(notes)
59
59
  notes = remove_redundant_note(notes)
60
+ notes = convert_legacy_bibitem_mentions(notes)
60
61
  notes = remove_invalid_references(notes)
61
62
  compare_with_definitions(notes, definitions)
62
63
  end
63
64
 
65
+ # EXPRESS remarks carry bibliography cross-references as AsciiDoc
66
+ # derived anchors (<<ISO_10303-42_2022>>). The glossarist mention
67
+ # syntax for a bibliography entry is {{bib:<anchor>}}: translate
68
+ # them so the notes survive (remove_invalid_references drops any
69
+ # note still carrying a raw <<...>> block).
70
+ def convert_legacy_bibitem_mentions(notes)
71
+ notes.each do |note|
72
+ note.content = note.content.gsub(/<<([^<>]+)>>/) do
73
+ "{{bib:#{Regexp.last_match(1)}}}"
74
+ end
75
+ end
76
+ end
77
+
64
78
  private
65
79
 
66
80
  def build_initial_notes
data/lib/suma/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Suma
4
- VERSION = "0.5.13"
4
+ VERSION = "0.5.14"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.