Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/dok.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2012-02-27 22:21:01 +0400
committerClement Farabet <clement.farabet@gmail.com>2012-02-27 22:21:01 +0400
commit7d4a6456613acc240e845f695ad5534558490c8d (patch)
tree4b881e39a4d94c3919fbb5b87cc9359be071c671
parent514cb4974d617796a520bb0de44fedee5bbc5645 (diff)
Fixed bug in search generator.
-rw-r--r--search.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/search.lua b/search.lua
index 6b8064a..a95d03f 100644
--- a/search.lua
+++ b/search.lua
@@ -30,10 +30,12 @@ local function install(entries, dir)
.. table.concat(entry, '^~^'):gsub('"','\\"'):gsub('\n',' ') .. '";')
end
local array = table.concat(vars, '\n')
+ array = array:gsub('%%','PERCENTFUCK')
local f = paths.concat(paths.install_html, paths.basename(dir), 'jse_form.js')
if paths.filep(f) then
local js = io.open(f):read('*all')
js = js:gsub('// SEARCH_ARRAY //', array)
+ js = js:gsub('PERCENTFUCK','%')
local w = io.open(f,'w')
w:write(js)
w:close()