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

support more arxiv urls formats #711

Closed
wants to merge 12 commits into from
Closed

support more arxiv urls formats #711

wants to merge 12 commits into from

Conversation

GlazerMann
Copy link
Collaborator

@GlazerMann GlazerMann changed the title support more arxiv support more arxiv urls formats Sep 2, 2018
@codecov
Copy link

codecov bot commented Sep 2, 2018

Codecov Report

Merging #711 into master will decrease coverage by 1.56%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #711      +/-   ##
============================================
- Coverage     68.61%   67.05%   -1.57%     
- Complexity     1609     1622      +13     
============================================
  Files            12       12              
  Lines          3202     3217      +15     
============================================
- Hits           2197     2157      -40     
- Misses         1005     1060      +55
Impacted Files Coverage Δ Complexity Δ
Template.php 73.08% <100%> (-2.53%) 1451 <0> (+13)
expandFns.php 90.71% <0%> (+0.71%) 0% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a616964...4cb6508. Read the comment docs.

Copy link
Owner

@ms609 ms609 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another instance where it's worth adding a test case: it doesn't look to me like your regexp will match the URL you provide as an example.

Template.php Outdated
@@ -832,7 +832,7 @@ protected function get_identifiers_from_url($url_sent = NULL) {
}
return $this->add_if_new("citeseerx", urldecode($match[1])); // We cannot parse these at this time

} elseif (preg_match("~\barxiv\.org/.*(?:pdf|abs)/(.+)$~", $url, $match)) {
} elseif (preg_match("~\barxiv\.org/.*(?:pdf|abs|tp/arxiv/papers/\d{4})/(.+?)(?:\.pdf)?$~us", $url, $match)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need unicode support for URLs?
and have you deliberately omitted the f from ftp?

@GlazerMann GlazerMann closed this Sep 6, 2018
@GlazerMann GlazerMann deleted the patch-20 branch September 6, 2018 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants