zotero-reference
zotero-reference copied to clipboard
[bug] DOI regex: illegal characters following doi links will be captured
https://github.com/MuiseDestiny/zotero-reference/blob/e8ac96c070db533b541ab681d23c79482b696304/src/modules/utils.ts#L11-L13
how to reproduce
It might catch illegal characters following doi (like the comma in https://doi.org/10.1016/j.physletb.2023.138153,)
possible solution
Maybe appending a \b is better.
DOI: /10\.\d{4,9}\/[-\._;\(\)\/:A-z0-9><]+[^\.\]]\b/,
example
Check the example here https://regex101.com/r/Bbdv5J/1
potential related bugs
And maybe we'd better do the same with arxiv or url regex
Thanks!!!