summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-07-11 10:16:06 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-07-11 10:16:06 +0300
commitab0debed28f4b7b30f96e554062f43cd8599a84f (patch)
treeb914ef31b68cca7cccd74906d4a5dc8a77ed0652
parentb1afa1ff42002106d1a0997f016d556640083645 (diff)
downloadluaotfload-ab0debed28f4b7b30f96e554062f43cd8599a84f.tar.gz
Support keys prefixed by "+"
Key/value features prefixed by a plus sign now work, fixes #16. Needs a more throughly testing, as it might break other feature assignments.
-rw-r--r--otfl-font-xtx.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/otfl-font-xtx.lua b/otfl-font-xtx.lua
index 8d81e02..8237851 100644
--- a/otfl-font-xtx.lua
+++ b/otfl-font-xtx.lua
@@ -181,7 +181,7 @@ local fontname = (lpeg.P("name:")/isname * (namespec/thename)) + lpeg.P(true)/
local sometext = (lpeg.R("az","AZ","09") + lpeg.S("+-."))^1
local truevalue = lpeg.P("+") * spaces * (sometext/istrue)
local falsevalue = lpeg.P("-") * spaces * (sometext/isfalse)
-local keyvalue = (lpeg.C(sometext) * spaces * lpeg.P("=") * spaces * lpeg.C(sometext))/iskey
+local keyvalue = lpeg.P("+") + (lpeg.C(sometext) * spaces * lpeg.P("=") * spaces * lpeg.C(sometext))/iskey
local somevalue = sometext/istrue
local subvalue = lpeg.P("(") * (lpeg.C(lpeg.P(1-lpeg.S("()"))^1)/issub) * lpeg.P(")") -- for Kim
local option = spaces * (keyvalue + falsevalue + truevalue + somevalue) * spaces