Testing bug fixes
This commit is contained in:
parent
649b170291
commit
051feeed61
12
stubb
12
stubb
|
@ -106,15 +106,13 @@ function parse_url(u) -- takes URL string
|
|||
u = 'gopher://'..u
|
||||
end
|
||||
|
||||
local default = {port=70, scheme='gopher'}
|
||||
local default = {port=70, scheme='gopher', path=''}
|
||||
local parsed = urlparser.parse(u, default)
|
||||
if not parsed.path then
|
||||
parsed.path = '/'
|
||||
end
|
||||
|
||||
if string.find(parsed.path, '^/[%d%a]') then
|
||||
parsed.gophertype = string.sub(parsed.path, 2, 2)
|
||||
parsed.path = string.sub(parsed.path, 3) or '/'
|
||||
elseif string.sub(parsed.path, -1) == '/' then
|
||||
parsed.path = string.sub(parsed.path, 3)
|
||||
elseif string.sub(parsed.path, -1) == '/' or parsed.path == '' then
|
||||
parsed.gophertype = '1'
|
||||
else
|
||||
parsed.gophertype = '0'
|
||||
|
@ -558,7 +556,7 @@ function open_in_less()
|
|||
end
|
||||
|
||||
if str then
|
||||
local less = io.popen('less', 'w')
|
||||
local less = io.popen(os.getenv('PAGER') or'less', 'w')
|
||||
less:write(str)
|
||||
less:close()
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue