Use the same quotation for all the strings.
This commit is contained in:
parent
befefb55a1
commit
239435ba9e
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function form_date(days)
|
function form_date(days)
|
||||||
_check_required(days, 'number')
|
_check_required(days, 'number')
|
||||||
return os.date("%d-%b-%Y", os.time() - days * 60 * 60 * 24)
|
return os.date('%d-%b-%Y', os.time() - days * 60 * 60 * 24)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ function pipe_to(command, data)
|
||||||
_check_required(command, 'string')
|
_check_required(command, 'string')
|
||||||
_check_required(data, 'string')
|
_check_required(data, 'string')
|
||||||
|
|
||||||
f = ifsys.popen(command, "w")
|
f = ifsys.popen(command, 'w')
|
||||||
ifsys.write(f, data)
|
ifsys.write(f, data)
|
||||||
|
|
||||||
return ifsys.pclose(f)
|
return ifsys.pclose(f)
|
||||||
|
@ -35,7 +35,7 @@ end
|
||||||
function pipe_from(command)
|
function pipe_from(command)
|
||||||
_check_required(command, 'string')
|
_check_required(command, 'string')
|
||||||
|
|
||||||
f = ifsys.popen(command, "r")
|
f = ifsys.popen(command, 'r')
|
||||||
local string = ''
|
local string = ''
|
||||||
while true do
|
while true do
|
||||||
s = ifsys.read(f)
|
s = ifsys.read(f)
|
||||||
|
|
|
@ -405,13 +405,13 @@ function Mailbox._fetch_fields(self, fields, messages)
|
||||||
if r == false then break end
|
if r == false then break end
|
||||||
|
|
||||||
if field ~= nil then
|
if field ~= nil then
|
||||||
field = string.gsub(field, "\r\n\r\n$", "\n")
|
field = string.gsub(field, '\r\n\r\n$', '\n')
|
||||||
results[m] = results[m] .. field
|
results[m] = results[m] .. field
|
||||||
if options.cache == true then self[m]._fields[f] = field end
|
if options.cache == true then self[m]._fields[f] = field end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
results[m] = string.gsub(results[m], "\n$", "")
|
results[m] = string.gsub(results[m], '\n$', '')
|
||||||
end
|
end
|
||||||
|
|
||||||
if options.close == true then self._cached_close(self) end
|
if options.close == true then self._cached_close(self) end
|
||||||
|
@ -951,7 +951,7 @@ function Mailbox.match_field(self, field, pattern, messages)
|
||||||
if #mesgs == 0 or fields == nil then return Set({}) end
|
if #mesgs == 0 or fields == nil then return Set({}) end
|
||||||
local results = {}
|
local results = {}
|
||||||
for m, f in pairs(fields) do
|
for m, f in pairs(fields) do
|
||||||
if regex_search(pattern, (string.gsub(f, "^[^:]*: ?(.*)$", "%1"))) then
|
if regex_search(pattern, (string.gsub(f, '^[^:]*: ?(.*)$', '%1'))) then
|
||||||
table.insert(results, {self, m})
|
table.insert(results, {self, m})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue