From 239435ba9ec2e6be39f703ef60b1f096581e126b Mon Sep 17 00:00:00 2001 From: Lefteris Chatzimparmpas Date: Wed, 22 Feb 2012 18:57:54 +0100 Subject: [PATCH] Use the same quotation for all the strings. --- src/auxiliary.lua | 6 +++--- src/mailbox.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/auxiliary.lua b/src/auxiliary.lua index 86d8bf4..80ce5b0 100644 --- a/src/auxiliary.lua +++ b/src/auxiliary.lua @@ -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) diff --git a/src/mailbox.lua b/src/mailbox.lua index ae330f4..3d69e7d 100644 --- a/src/mailbox.lua +++ b/src/mailbox.lua @@ -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