*** empty log message ***
authorroot <root>
Thu, 12 Jan 2006 23:30:51 +0000 (23:30 +0000)
committerroot <root>
Thu, 12 Jan 2006 23:30:51 +0000 (23:30 +0000)
src/perl/selection

index 927a11c37336aa9656a75986398f23accde9abd4..d5fdd8b254b8f855ad4ec8e15c9396d7c631b50b 100644 (file)
@@ -23,11 +23,14 @@ sub on_init {
 # "find interetsing things"-patterns
 my @mark_patterns = (
    # common types of "parentheses"
-   qr{(?:^|\s) ‘  ([^‘’]+?) ’ (?:\s|\)|$)}x,
-   qr{(?:^|\s) `  ([^`']+?) ' (?:\s|\)|$)}x,
-   qr{         \{ ([^{}]+?) \} }x,
-   qr{         \[ ([^{}]+?) \] }x,
-   qr{         \( ([^()]+?) \) }x,
+   qr{ (?<![^[:space:]]) ‘ ([^‘’]+) ’ (?![^[:space]]) }x,
+   qr{ (?<![^[:space:]]) ` ([^`']+) ' (?![^[:space]]) }x,
+   qr{ (?<![^[:space:]]) (" [^[:space:]] [^"]* ")                 }x,
+   qr{                   (" [^"]* [^[:space:]] ") (?![^[:space]]) }x,
+   qr{ \< ([^<>[:space:]]+) \> }x,
+   qr{ \{ ([^{}[:space:]]+) \} }x,
+   qr{ \[ ([^{}[:space:]]+) \] }x,
+   qr{ \( ([^()[:space:]]+) \) }x,
 
    # urls, just a heuristic
    qr{(
@@ -70,8 +73,6 @@ sub on_sel_extend {
             my $ofs = $-[1];
             my $match = $1;
 
-            push @matches, [$ofs, length $match];
-
             for my $regex (@simplify_patterns) {
                if ($match =~ $regex) {
                   $match = $1;