summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-07-13 14:36:42 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2014-07-13 14:36:42 +0200
commit0c8c0abc6c1dafa129ccac2beca02b3c4afbccbf (patch)
treeb0458bbfddcb92bb3bf20b5b7b42690e6d8915c5 /src
parent5903e876c61b1e999e03404abf5c7a69bb194482 (diff)
downloadluaotfload-0c8c0abc6c1dafa129ccac2beca02b3c4afbccbf.tar.gz
[color] set color callback according to configuration
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-colors.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/luaotfload-colors.lua b/src/luaotfload-colors.lua
index 476826e..67041fe 100644
--- a/src/luaotfload-colors.lua
+++ b/src/luaotfload-colors.lua
@@ -20,14 +20,6 @@ explanation: http://tug.org/pipermail/luatex/2013-May/004305.html
--doc]]--
-local color_callback = config.luaotfload.run.color_callback
-if not color_callback then
- --- maybe this would be better as a method: "early" | "late"
- color_callback = "pre_linebreak_filter"
--- color_callback = "pre_output_filter" --- old behavior, breaks expansion
-end
-
-
local newnode = node.new
local nodetype = node.id
local traverse_nodes = node.traverse
@@ -307,6 +299,11 @@ local color_callback_activated = 0
--- unit -> unit
add_color_callback = function ( )
+ local color_callback = config.luaotfload.run.color_callback
+ if not color_callback then
+ color_callback = "pre_linebreak_filter"
+ end
+
if color_callback_activated == 0 then
luatexbase.add_to_callback(color_callback,
color_handler,