aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--core/ext/find.lua1
-rw-r--r--core/ext/mime_types.lua2
2 files changed, 3 insertions, 0 deletions
diff --git a/core/ext/find.lua b/core/ext/find.lua
index 8617c274..e0491cd8 100644
--- a/core/ext/find.lua
+++ b/core/ext/find.lua
@@ -89,6 +89,7 @@ function find.replace(rtext)
rtext = rtext:gsub('%%%%', '\\037') -- escape '%%'
if find.captures then
for i, v in ipairs(find.captures) do
+ v = v:gsub('%%', '%%%%') -- escape '%' for gsub
rtext = rtext:gsub('%%'..i, v)
end
end
diff --git a/core/ext/mime_types.lua b/core/ext/mime_types.lua
index 454eec9e..dcc1e690 100644
--- a/core/ext/mime_types.lua
+++ b/core/ext/mime_types.lua
@@ -15,6 +15,7 @@ local languages = {
javascript = 'javascript',
lua = 'lua',
makefile = 'makefile',
+ maxima = 'maxima',
php = 'php',
python = 'python',
ragel = 'ragel',
@@ -37,6 +38,7 @@ local extensions = {
js = l.javascript,
lua = l.lua,
mak = l.makefile, makefile = l.makefile, Makefile = l.makefile,
+ maxima = l.maxima,
php = l.php,
py = l.python, pyw = l.python,
rhtml = l.rhtml,