… | |
… | |
10 | } |
10 | } |
11 | |
11 | |
12 | my @patterns = ( |
12 | my @patterns = ( |
13 | # urls, just a heuristic |
13 | # urls, just a heuristic |
14 | qr{( |
14 | qr{( |
15 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),]+ |
15 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~]+ |
16 | [^.] # do not include a trailing dot, its wrong too often |
16 | [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27(),~] # do not include a trailing dot, its wrong too often |
17 | )}x, |
17 | )}x, |
18 | |
18 | |
|
|
19 | # common forms of quoting |
|
|
20 | qr{(?:^|\s) [‘`] ([^‘`’']+) [’'] (?:\s|$)}x, |
|
|
21 | |
19 | # shell-like argument quoting |
22 | # shell-like argument quoting |
20 | qr{\G\s*( |
23 | qr{\G [\ \t|&;<>()] *( |
21 | (?: |
24 | (?: |
22 | [^"'\\ \t]+ |
25 | [^\\"'\ \t|&;<>()]+ |
23 | | \\. |
26 | | \\. |
24 | | " ([^\\"]+ | \\. )* " |
27 | | " (?: [^\\"]+ | \\. )* " |
25 | | ' [^']* ' |
28 | | ' [^']* ' |
26 | )+ |
29 | )+ |
27 | )}xs, |
30 | )}x, |
28 | ); |
31 | ); |
|
|
32 | |
|
|
33 | my $x = "‘hallole’"; |
29 | |
34 | |
30 | sub on_sel_extend { |
35 | sub on_sel_extend { |
31 | my ($self) = @_; |
36 | my ($self) = @_; |
32 | |
37 | |
33 | my ($row, $col) = $self->selection_mark; |
38 | my ($row, $col) = $self->selection_mark; |