Skip to content

Commit

Permalink
fix docid remove_parts & remove_dates methods
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew2net committed Apr 3, 2023
1 parent 5e26f4a commit 6c69423
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/relaton_bib/document_identifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ def initialize(**args)
def remove_part
case @type
when "Chinese Standard" then @id.sub!(/\.\d+/, "")
when "ISO", "IEC", "BSI" then @id.sub!(/-[^:]+/, "")
when "URN" then remove_urn_part
else @id.sub!(/-[^:]+/, "")
end
end

def remove_date
case @type
when "Chinese Standard" then @id.sub!(/-[12]\d\d\d/, "")
when "ISO", "IEC", "BSI" then @id.sub!(/:[12]\d\d\d/, "")
when "URN"
@id.sub!(/^(urn:iec:std:[^:]+:[^:]+:)[^:]*/, '\1')
else @id.sub!(/:[12]\d\d\d/, "")
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/relaton_bib/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RelatonBib
VERSION = "1.14.8".freeze
VERSION = "1.14.9".freeze
end

0 comments on commit 6c69423

Please sign in to comment.