Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOI: Find DOIs in links, and other improvements #2143

Merged
merged 1 commit into from May 14, 2020

Conversation

@dstillman
Copy link
Member

dstillman commented Mar 13, 2020

Search links in addition to page text, as discussed in the forums.

Also:

  • Make the order of results match the page
  • Possibly fix an issue where some DOIs could be left out if they
    appeared within the same text string (lastMatch should've been
    lastIndex; the former is read-only and non-numeric, so it's not clear
    that this ever worked)
  • Simplify the code

Note: I added a test for this, but for some reason it fails via the test runner due to some site cookie issue, even though it works when run manually (and even works when populating the tests). Apparently our handling of cookies is different between tests and manual translation.

Search links in addition to page text, as discussed in the forums [1].

Also:

- Make the order of results match the page
- Possibly fix an issue where some DOIs could be left out if they
  appeared within the same text string (lastMatch should've been
  lastIndex; the former is read-only and non-numeric, so it's not clear
  that this ever worked)
- Simplify the code

[1] https://forums.zotero.org/discussion/comment/350735/#Comment_350735
@adam3smith
Copy link
Collaborator

adam3smith commented May 14, 2020

This looks good to me and works -- the new test runs for me too, btw.
Do you want to go ahead & merge @dstillman ?

@dstillman dstillman merged commit dee7756 into zotero:master May 14, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.