summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-05 00:48:46 +0000
committerKarl Berry <karl@freefriends.org>2020-03-05 00:48:46 +0000
commitf210bce174e1f2f05305ab03e88e120a1cbfc4da (patch)
tree5c4e2ad096b5c745e859516ac3196fa0864292d5 /Master/texmf-dist/tex/context/base/mkiv/typo-chr.lua
parent35fd641a3546acc0c62e0aa7f134888e36da30d4 (diff)
context (from cont-tmf.zip of Feb 17 16:00, size 116339406)
git-svn-id: svn://tug.org/texlive/trunk@54086 c570f23f-e606-0410-a88d-b1316a301751
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.lua22
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()