diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-12-13 23:27:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-12-13 23:27:00 +0100 |
commit | 3a75fc96a5e7607afbead86fd9a3a9a8831494aa (patch) | |
tree | c3972f260ed3957fb4a742fd259f3067c2d9c1bb /tex/generic | |
parent | a88d77afdd9ea519815a25698e446908aec42ff9 (diff) | |
download | context-3a75fc96a5e7607afbead86fd9a3a9a8831494aa.tar.gz |
beta 2009.12.13 23:27
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index e9a57d93b..c03196d1b 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 12/01/09 17:16:42 +-- merge date : 12/13/09 23:30:54 do -- begin closure to overcome local limits and interference @@ -200,6 +200,7 @@ end local simple_escapes = { ["-"] = "%-", ["."] = "%.", + ["?"] = ".", ["*"] = ".*", } @@ -262,6 +263,19 @@ function string:striplong() -- strips newlines and leading spaces return self end +function string:topattern(lowercase,strict) + if lowercase then + self = self:lower() + end + self = gsub(self,".",simple_escapes) + if self == "" then + self = ".*" + elseif strict then + self = "^" .. self .. "$" + end + return self +end + end -- closure do -- begin closure to overcome local limits and interference @@ -274,6 +288,8 @@ if not modules then modules = { } end modules ['l-lpeg'] = { license = "see context related readme files" } +lpeg = require("lpeg") + local P, R, S, Ct, C, Cs, Cc = lpeg.P, lpeg.R, lpeg.S, lpeg.Ct, lpeg.C, lpeg.Cs, lpeg.Cc --~ l-lpeg.lua : |