diff options
author | Elie Roux <elie.roux@telecom-bretagne.eu> | 2013-04-19 00:26:56 -0700 |
---|---|---|
committer | Elie Roux <elie.roux@telecom-bretagne.eu> | 2013-04-19 00:26:56 -0700 |
commit | f01d69e79b4016db76e7672660f82db3bd6df7ed (patch) | |
tree | fee389d4852b60e4c40db0168c6e7782a48c4b03 /otfl-font-ltx.lua | |
parent | a9510469b60edeceedf72811e7737ea0f3c56dc5 (diff) | |
parent | 79fd3d94527ecaad80cb4352a5650788a9e971df (diff) | |
download | luaotfload-f01d69e79b4016db76e7672660f82db3bd6df7ed.tar.gz |
Merge pull request #3 from phi-gamma/experimental
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("]")) |