Search - add support for raw reddit links (#663)
* Search - add support for raw reddit links If a search query starts with 'https://www.reddit.com/' or 'https://old.reddit.com/', this prefix will be truncated and the query will be processed normally. For example, a search query 'https://www.reddit.com/r/rust' will redirect to r/rust. * Search - support a wider variety of reddit links. Add once cell dependency for static regex support (avoid compiling the same regex multiple times). All search queries are now matched against a regex (provided by @Daniel-Valentine) that determines if it is a reddit link. If it is, the prefix specifying the reddit instance will be truncated from the query that will then be processed normally. For example, the query 'https://www.reddit.com/r/rust' will be treated the same way as the query 'r/rust'.
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -677,6 +677,7 @@ dependencies = [
|
||||
"hyper-rustls",
|
||||
"libflate",
|
||||
"lipsum",
|
||||
"once_cell",
|
||||
"percent-encoding",
|
||||
"regex",
|
||||
"route-recognizer",
|
||||
|
Reference in New Issue
Block a user