check encoding more smart.

This commit is contained in:
mattn
2012-06-13 18:44:45 +09:00
parent 05688356b3
commit bddc3f9ff5
2 changed files with 7 additions and 14 deletions

View File

@@ -492,10 +492,7 @@ function! zencoding#anchorizeURL(flag)
endif
let mx = '.*<title[^>]*>\s*\zs\([^<]\+\)\ze\s*<\/title[^>]*>.*'
let content = zencoding#util#getContentFromURL(url, 0)
if len(matchstr(content, mx)) == 0
let content = zencoding#util#getContentFromURL(url, 1)
endif
let content = zencoding#util#getContentFromURL(url)
let content = substitute(content, '\r', '', 'g')
let content = substitute(content, '[ \n]\+', ' ', 'g')
let content = substitute(content, '<!--.\{-}-->', '', 'g')