mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-10 11:41:35 +08:00
#517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters
This commit is contained in:
18
autoload/ale/uri.vim
Normal file
18
autoload/ale/uri.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
" This probably doesn't handle Unicode characters well.
|
||||
function! ale#uri#Encode(value) abort
|
||||
return substitute(
|
||||
\ a:value,
|
||||
\ '\([^a-zA-Z0-9\\/$\-_.!*''(),]\)',
|
||||
\ '\=printf(''%%%02x'', char2nr(submatch(1)))',
|
||||
\ 'g'
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! ale#uri#Decode(value) abort
|
||||
return substitute(
|
||||
\ a:value,
|
||||
\ '%\(\x\x\)',
|
||||
\ '\=nr2char(''0x'' . submatch(1))',
|
||||
\ 'g'
|
||||
\)
|
||||
endfunction
|
||||
Reference in New Issue
Block a user