Permalink
Browse files

Version 4.7: This is an upgrade for Gist.vim: fixed: filetype detection.

  • Loading branch information...
1 parent fa16d2b commit f4bab8547fa2f0814bc58aa8e2805d11a56b0738 @mattn mattn committed with Jan 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 plugin/gist.vim
View
@@ -1,8 +1,8 @@
"=============================================================================
" File: gist.vim
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
-" Last Change: 13-Dec-2010.
-" Version: 4.6
+" Last Change: 04-Jan-2011.
+" Version: 4.7
" WebPage: http://github.com/mattn/gist-vim
" License: BSD
" Usage:
@@ -258,7 +258,7 @@ endfunction
function! s:GistDetectFiletype(gistid)
let url = 'https://gist.github.com/'.a:gistid
- let mx = '^.*<div class="data syntax type-\([^"]\+\)">.*$'
+ let mx = '^.*<div class=".\{-}type-\([^"]\+\)">.*$'
let res = system('curl -s '.url)
let res = substitute(matchstr(res, mx), mx, '\1', '')
let res = substitute(res, '.*\(\.[^\.]\+\)$', '\1', '')

0 comments on commit f4bab85

Please sign in to comment.