File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " leth"
3
- version = " 0.1.2 "
3
+ version = " 0.1.3 "
4
4
authors = [
" fcd <[email protected] >" ]
5
5
edition = " 2018"
6
6
Original file line number Diff line number Diff line change @@ -9,14 +9,16 @@ use std::process::Command;
9
9
use regex:: Regex ;
10
10
use skim:: { Skim , SkimOptionsBuilder } ;
11
11
12
+ const URL_REGEX : & str = r"(http(?:s)://[a-zA-Z0-9_/?+&.=@-]+)" ;
13
+
12
14
pub fn main ( ) {
13
15
let options = SkimOptionsBuilder :: default ( )
14
16
. multi ( true )
15
17
. bind ( vec ! [ "ctrl-k:kill-line" ] )
16
18
. build ( )
17
19
. unwrap ( ) ;
18
20
19
- let re = Regex :: new ( r"(http(?:s)://[a-zA-Z0-9_/?+&.=-]+)" ) . unwrap ( ) ;
21
+ let re = Regex :: new ( URL_REGEX ) . unwrap ( ) ;
20
22
let mut buffer = String :: new ( ) ;
21
23
io:: stdin ( ) . read_to_string ( & mut buffer) . unwrap ( ) ;
22
24
let lines = buffer. split ( "\n " ) ;
You can’t perform that action at this time.
0 commit comments