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, 5 insertions, 4 deletions
diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua
index acf04fead..8d6c5dd31 100644
--- a/tex/context/base/util-mrg.lua
+++ b/tex/context/base/util-mrg.lua
@@ -13,11 +13,10 @@ local concat = table.concat
local type, next = type, next
utilities = utilities or {}
-utilities.merger = utilities.merger or { } -- maybe mergers
+local merger = utilities.merger or { }
+utilities.merger = merger
utilities.report = logs and logs.reporter("system") or print
-local merger = utilities.merger
-
merger.strip_comment = true
local m_begin_merge = "begin library merge"
@@ -63,9 +62,11 @@ 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)