summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-18 22:52:35 +0000
committerKarl Berry <karl@freefriends.org>2019-06-18 22:52:35 +0000
commitabdefd713807e267b3cb06bfbb817db2ad764070 (patch)
tree8800b41c503ec53035d299a44fc4d3e3a3269b14 /Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua
parentaf40071956ab22eae0d446cced49296afc407c1e (diff)
fix unicode specials at beginning of node list, tex4ht r578
git-svn-id: svn://tug.org/texlive/trunk@51399 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua')
-rw-r--r--Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua16
1 files changed, 12 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua b/Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua
index 2f6bb120255..c6965220166 100644
--- a/Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua
+++ b/Master/texmf-dist/tex/generic/tex4ht/fontspec-4ht.lua
@@ -1,5 +1,5 @@
--- fontspec-4ht.lua (2019-05-27-14:22), generated from tex4ht-4ht.tex
--- Copyright 2016-2017 TeX Users Group
+-- fontspec-4ht.lua (2019-06-18-15:43), generated from tex4ht-4ht.tex
+-- Copyright 2016-2019 TeX Users Group
--[[
%
% This work may be distributed and/or modified under the
@@ -17,7 +17,7 @@
%
% If you modify this program, changing the
% version identification would be appreciated.
-\immediate\write-1{version 2019-05-27-14:22}
+\immediate\write-1{version 2019-06-18-15:43}
--]]
local M = {}
@@ -40,6 +40,14 @@ local make_node = function(data)
return n
end
+local function first_node(head)
+ local head = head
+ while head.prev do
+ head = head.prev
+ end
+ return head
+end
+
-- this should be table with patterns for allowed fonts
local allowed_names = {"^cmr", "^cmb","^cmt", "^cmb", "^cmcs", "^rm%-l", "^cmi", "^ec%-lm", "none"}
@@ -95,7 +103,7 @@ function M.char_to_entity(head)
n.dir = "+TLT"
end
end
- return head
+ return first_node(head)
end
M.allowed = allowed_names