diff options
author | drry | 2008-04-07 04:38:52 +0000 |
---|---|---|
committer | drry | 2008-04-07 04:38:52 +0000 |
commit | 521c7276d11b688914da6937cfd88f56447d0448 (patch) | |
tree | 87f37517d332e1c23136818e646d27079da8e16c /lookupDictionary.js | |
parent | 8606eb07a4fd2cf38bbe333bfe971e62f06c3f02 (diff) | |
download | vimperator-plugins-521c7276d11b688914da6937cfd88f56447d0448.tar.bz2 |
lang/javascript/vimperator-plugins/trunk/lookupDictionary.js:
* fixed a regexp.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@9067 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'lookupDictionary.js')
-rw-r--r-- | lookupDictionary.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lookupDictionary.js b/lookupDictionary.js index 4d7c822..3a6b71f 100644 --- a/lookupDictionary.js +++ b/lookupDictionary.js @@ -73,7 +73,7 @@ function getHTML(url, callback){ * @return {DOMDocument} */ function createHTMLDocument(str){ - str = str.replace(/^[\s\S]*?<html(?:\s[^>]+?)?>|[\r\n]+|<\/html\s*>[\S\s]*$/ig, ''); + str = str.replace(/^[\s\S]*?<html(?:\s[^>]+?)?>|<\/html\s*>[\S\s]*$/ig, '').replace(/[\r\n]+/g, " "); var htmlFragment = document.implementation.createDocument(null,'html',null); var range = document.createRange(); range.setStartAfter(window.content.document.body); |