diff options
Diffstat (limited to 'luaotfload-parsers.lua')
-rw-r--r-- | luaotfload-parsers.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/luaotfload-parsers.lua b/luaotfload-parsers.lua index 89e3bc9..0789c42 100644 --- a/luaotfload-parsers.lua +++ b/luaotfload-parsers.lua @@ -49,6 +49,10 @@ local lfs = lfs local lfsisfile = lfs.isfile local lfsisdir = lfs.isdir +------------------------------------------------------------------------------- +--- FONTCONFIG +------------------------------------------------------------------------------- + --[[doc-- For fonts installed on the operating system, there are several @@ -296,3 +300,19 @@ end luaotfload.parsers.read_fonts_conf = read_fonts_conf + +------------------------------------------------------------------------------- +--- MISC PARSERS +------------------------------------------------------------------------------- + + +local trailingslashes = P"/"^1 * P(-1) +local stripslashes = C((1 - trailingslashes)^0) +parsers.stripslashes = stripslashes + +local comma = P"," +local noncomma = 1-comma +local splitcomma = Ct((C(noncomma^1) + comma)^1) +parsers.splitcomma = splitcomma + + |