From 79fd3d94527ecaad80cb4352a5650788a9e971df Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 18 Apr 2013 23:41:25 +0200 Subject: fix font syntax parser --- otfl-font-ltx.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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("]")) -- cgit v1.2.3