diff options
author | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-02-24 15:12:57 +0000 |
commit | 1314fbe93790c501dc436a5cf99f106b9e5c0f63 (patch) | |
tree | 04dc7734c8be8ffe385d41f4388826ef5857b6f9 /Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua | |
parent | eb80ce7b34f59896a1dfee5ca422495394d6677f (diff) |
Revert "ConTeXt version 2019.02.22 19:35"
This reverts commit 5c6357cdb820b4f628d036ba7b2248f221d50c0b.
git-svn-id: svn://tug.org/texlive/trunk@50112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua index 88605631d84..d9178b1dfc9 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/buff-ver.lua @@ -43,7 +43,6 @@ local findfile = resolvers.findfile local addsuffix = file.addsuffix local v_yes = variables.yes -local v_no = variables.no local v_last = variables.last local v_all = variables.all local v_absolute = variables.absolute @@ -142,8 +141,7 @@ local functions = { __index = { local handlers = { } function visualizers.newhandler(name,data) - local tname = type(name) - local tdata = type(data) + local tname, tdata = type(name), type(data) if tname == "table" then -- (data) setmetatable(name,getmetatable(name) or functions) return name @@ -257,7 +255,7 @@ function visualizers.load(name) if trace_visualize then report_visualizers("loading visualizer %a",name) end - lua.registercode(luaname) -- only used here, end up in format + lua.registercode(luaname) context.input(texname) end if rawget(specifications,name) == nil then @@ -447,7 +445,7 @@ function visualizers.registerescapecommand(name,token,normalmethod,escapecommand end token = P(token) local notoken = hack((1 - token)^1) - local cstoken = Cs(name_pattern * (space_pattern/"")) + local cstoken = name_pattern * space_pattern escapepattern = ( (token / "") * (cstoken / (escapecommand or texcommand)) @@ -616,12 +614,7 @@ end local onlyspaces = S(" \t\f\n\r")^0 * P(-1) local function getstrip(lines,first,last) - if not first then - first = 1 - end - if not last then - last = #lines - end + local first, last = first or 1, last or #lines for i=first,last do local li = lines[i] if #li == 0 or lpegmatch(onlyspaces,li) then @@ -743,14 +736,12 @@ end local function filter(lines,settings) -- todo: inline or display in settings local strip = settings.strip - -- if strip and strip == "" then - if strip ~= v_no and strip ~= false then + if strip and strip ~= "" then lines = realign(lines,strip) end - local line = 0 - local n = 0 - local range = settings.range + local line, n = 0, 0 local first, last, m = getstrip(lines) + local range = settings.range if range then first, last = getrange(lines,first,last,range) first, last = getstrip(lines,first,last) |