diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua index 15d14c8601b..7a0f1fd7521 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua @@ -99,8 +99,8 @@ local wordboundary_code = boundarycodes.word local texgetnest = tex.getnest -- to be used local texsetcount = tex.setcount -local flush_node = node.flush_node -local flush_list = node.flush_list +local flush_node = nodes.flush_node +local flush_list = nodes.flush_list local settexattribute = tex.setattribute local punctuation = characters.is_punctuation @@ -175,7 +175,7 @@ local function pickup(head,tail,str) while true do local prev = first.prev if prev and prev[a_marked] == attr then - if prev.id == localpar_code then -- and prev.subtype == 0 + if prev.id == localpar_code then -- and start_of_par(prev) break else first = prev @@ -188,6 +188,14 @@ local function pickup(head,tail,str) end end +local function found(str) + local list = texgetnest() + if list then + local tail = list.tail + return tail and tail[a_marked] == marked[str] + end +end + local actions = { remove = function(specification) local list = texgetnest() @@ -254,6 +262,12 @@ interfaces.implement { arguments = "string", } +interfaces.implement { + name = "doifelsemarkedcontent", + actions = function(str) ctx_doifelse(found(str)) end, + arguments = "string", +} + -- We just put these here. interfaces.implement { @@ -284,6 +298,8 @@ interfaces.implement { -- end, -- } +-- not needed in lmtx ... + interfaces.implement { name = "lastnodeid", actions = function() |