summaryrefslogtreecommitdiffstats
path: root/lib/format.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/format.lua')
-rw-r--r--lib/format.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/format.lua b/lib/format.lua
index b529470..92f5a62 100644
--- a/lib/format.lua
+++ b/lib/format.lua
@@ -13,6 +13,10 @@ function dostounix ( str )
return data
end
+function escapemagiccharacters ( str )
+ return string.gsub(str, "[%(%)%.%%%+%-%*%?%[%]%^%$]", "%%%1")
+end
+
-- search and remove all blank and commented lines from a string or table of lines
-- returns a table to iterate over without the blank or commented lines