altmetric / identifiers

Collection of utilities related to the extraction, validation and normalization of various scholarly identifiers.
https://rubygems.org/gems/identifiers
MIT License
5 stars 1 forks source link

Remove trailing punctuation after Wiley DOIs #11

Closed mudge closed 7 years ago

mudge commented 7 years ago

While our new logic supported valid DOIs ended in punctuation and removed superfluous punctuation from otherwise valid DOIs, it didn't support both at the same time: a valid, old Wiley DOI ending in # couldn't be extracted if it also had trailing punctuation.

This fixes that by recursively stripping trailing punctuation one character at a time and re-extracting until a valid DOI is found.