mirror of
https://github.com/moparisthebest/imapfilter
synced 2024-12-21 23:28:49 -05:00
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)
|
||||
_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
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ function pipe_to(command, data)
|
||||
_check_required(command, 'string')
|
||||
_check_required(data, 'string')
|
||||
|
||||
f = ifsys.popen(command, "w")
|
||||
f = ifsys.popen(command, 'w')
|
||||
ifsys.write(f, data)
|
||||
|
||||
return ifsys.pclose(f)
|
||||
@ -35,7 +35,7 @@ end
|
||||
function pipe_from(command)
|
||||
_check_required(command, 'string')
|
||||
|
||||
f = ifsys.popen(command, "r")
|
||||
f = ifsys.popen(command, 'r')
|
||||
local string = ''
|
||||
while true do
|
||||
s = ifsys.read(f)
|
||||
|
@ -405,13 +405,13 @@ function Mailbox._fetch_fields(self, fields, messages)
|
||||
if r == false then break end
|
||||
|
||||
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
|
||||
if options.cache == true then self[m]._fields[f] = field end
|
||||
end
|
||||
end
|
||||
end
|
||||
results[m] = string.gsub(results[m], "\n$", "")
|
||||
results[m] = string.gsub(results[m], '\n$', '')
|
||||
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
|
||||
local results = {}
|
||||
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})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user