summaryrefslogtreecommitdiff
path: root/tex/context/base/util-mrg.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/util-mrg.lua')
-rw-r--r--tex/context/base/util-mrg.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua
index 8d6c5dd31..acf04fead 100644
--- a/tex/context/base/util-mrg.lua
+++ b/tex/context/base/util-mrg.lua
@@ -13,10 +13,11 @@ local concat = table.concat
local type, next = type, next
utilities = utilities or {}
-local merger = utilities.merger or { }
-utilities.merger = merger
+utilities.merger = utilities.merger or { } -- maybe mergers
utilities.report = logs and logs.reporter("system") or print
+local merger = utilities.merger
+
merger.strip_comment = true
local m_begin_merge = "begin library merge"
@@ -62,11 +63,9 @@ end
local function self_save(name, data)
if data ~= "" then
if merger.strip_comment then
+ -- saves some 20K
local n = #data
- -- saves some 20K .. scite comments
data = gsub(data,"%-%-~[^\n\r]*[\r\n]","")
- -- saves some 20K .. ldx comments
- data = gsub(data,"%-%-%[%[ldx%-%-.-%-%-ldx%]%]%-%-","")
utilities.report("merge: %s bytes of comment stripped, %s bytes of code left",n-#data,#data)
end
io.savedata(name,data)