diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-18 23:41:25 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-18 23:41:25 +0200 |
commit | 79fd3d94527ecaad80cb4352a5650788a9e971df (patch) | |
tree | de7f87c1c771720a75ba863d7cc3ca25756f8881 /otfl-font-ltx.lua | |
parent | b0c22678d1f776f991ffef67694451b8bb5f9e20 (diff) | |
download | luaotfload-79fd3d94527ecaad80cb4352a5650788a9e971df.tar.gz |
fix font syntax parser
Diffstat (limited to 'otfl-font-ltx.lua')
-rw-r--r-- | otfl-font-ltx.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/otfl-font-ltx.lua b/otfl-font-ltx.lua index d1799d7..afc8621 100644 --- a/otfl-font-ltx.lua +++ b/otfl-font-ltx.lua @@ -128,7 +128,9 @@ local function iskey (k,v) feature_list[k] = v end local P, S, R, C = lpeg.P, lpeg.S, lpeg.R, lpeg.C local spaces = P(" ")^0 -local namespec = (1-S("/:("))^0 -- was: (1-S("/: ("))^0 +--local namespec = (1-S("/:("))^0 -- was: (1-S("/: ("))^0 +--[[phg-- this prevents matching of absolute paths as file names --]]-- +local namespec = (1-S("/:("))^1 local filespec = (R("az", "AZ") * P(":"))^-1 * (1-S(":("))^1 local stylespec = spaces * P("/") * (((1-P(":"))^0)/isstyle) * spaces local filename = (P("file:")/isfile * (filespec/thename)) + (P("[") * P(true)/isname * (((1-P("]"))^0)/thename) * P("]")) |