Changeset 20876

Show
Ignore:
Timestamp:
10/07/08 07:48:03 (2 months ago)
Author:
drry
Message:
  • trivial fixes.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/lo.js

    r20875 r20876  
    4848    if (!migemo) 
    4949      return new RegExp(str, 'i'); 
    50     if (str.indexOf('/') == 0) { 
     50    if (str.indexOf('/') == 0) 
    5151      return new RegExp(str.slice(1), 'i'); 
    52     } else {  
     52    else 
    5353      return migemo.getRegExp(str); 
    54     } 
    5554  } 
    5655 
    5756  function filteredLinks (word) { 
    5857    if (word.match(/^\s*$/)) 
    59       return []; // [it for each (it in content.document.links) if (it.href)];   
     58      return []; // [it for each (it in content.document.links) if (it.href)]; 
    6059    let re = makeRegExp(word); 
    61     return [it for each (it in content.document.links) if (lmatch(re, it))];  
     60    return [it for each (it in content.document.links) if (lmatch(re, it))]; 
    6261  } 
    6362 
     
    105104        let links = filteredLinks(word); 
    106105        return [0, [[it.href, it.textContent] for each (it in links)]]; 
    107       }, 
     106      } 
    108107    } 
    109108  ); 
     
    133132        liberator.buffer.followLink(lolinks[0], where); 
    134133      } else { 
    135         liberator.echoerr('lol') 
     134        liberator.echoerr('lol'); 
    136135      } 
    137136    }, 
    138137    { 
    139       options: looptions; 
     138      options: looptions, 
    140139      completer: function (word) { 
    141140        let opts = liberator.parseArgs(word, looptions, "1", true); 
    142141        log(opts); 
    143         lolinks = filteredLinks(word);//word.match(/\bhttp[^\s]+/)); 
     142        lolinks = filteredLinks(word);//word.match(/\bhttp\S+/)); 
    144143        return [0, [[it.href, it.textContent] for each (it in lolinks)]]; 
    145144      }