File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,14 @@ Version 1.2.0 [WIP]
2
2
-------------------------------------------------------------------------
3
3
4
4
NEW FEATURES
5
- *Jay Jacobs' "tldextract" functionality has been merged with urltools, and can be accessed
5
+ * Jay Jacobs' "tldextract" functionality has been merged with urltools, and can be accessed
6
6
with "suffix_extract"
7
7
8
+ BUG FIXES
9
+
10
+ * A bug in which fragments could not be retrieved (and were incorrectly identified as parameters)
11
+ has been fixed. Thanks to Nicolas Coutin for reporting it and providing a reproducible example.
12
+
8
13
Version 1.1.1
9
14
-------------------------------------------------------------------------
10
15
BUG FIXES
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ std::string parsing::path(std::string& url){
49
49
return output;
50
50
}
51
51
output = url.substr (0 ,fragment);
52
- url = url.substr (fragment+ 1 );
52
+ url = url.substr (fragment);
53
53
return output;
54
54
}
55
55
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ test_that("Check parsing can handle missing elements", {
26
26
expect_that(data $ fragment [1 ], equals(" ending" ))
27
27
})
28
28
29
+ test_that(" Parsing does not up and die and misplace the fragment" ,{
30
+ data <- url_parse(" http://www.yeastgenome.org/locus/S000005366/overview#protein" )
31
+ expect_that(data $ fragment [1 ], equals(" protein" ))
32
+ })
33
+
29
34
test_that(" Parameter parsing can handle multiple, non-existent and pre-trailing parameters" ,{
30
35
urls <- c(" https://www.google.com:80/foo.php?api_params=parsable&this_parameter=selfreferencing&hiphop=awesome" ,
31
36
" https://www.google.com:80/foo.php?api_params=parsable&this_parameter=selfreferencing&hiphop=awesome#foob" ,
@@ -39,4 +44,5 @@ test_that("Parameter parsing works where the parameter appears earlier in the UR
39
44
url <- url_parameters(" www.housetrip.es/tos-de-vacaciones/geo?from=01/04/2015&guests=4&to=05/04/2015" ," to" )
40
45
expect_that(ncol(url ), equals(1 ))
41
46
expect_that(url $ to [1 ], equals(" 05/04/2015" ))
42
- })
47
+ })
48
+
You can’t perform that action at this time.
0 commit comments