From a02abd16b0ffc8a21270297008e766917e25670b Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 3 May 2013 19:07:07 +0200 Subject: workaround for invalid request syntax --- luaotfload-features.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'luaotfload-features.lua') diff --git a/luaotfload-features.lua b/luaotfload-features.lua index 494d02d..cd00a0f 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -465,6 +465,18 @@ end local handle_request = function (specification) local request = lpegmatch(font_request, specification.specification) + if not request then + --- happens when called with an absolute path + --- in an anonymous lookup; + --- we try to behave as friendly as possible + --- just go with it ... + report("log", 0, "load", "invalid request ā€œ%sā€ of type anon", + specification.specification) + report("log", 0, "load", "use square bracket syntax or consult the documentation.") + specification.name = specification.specification + specification.lookup = "file" + return specification + end local lookup, name = select_lookup(request) request.features = set_default_features(request.features) -- cgit v1.2.3