diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-10-04 20:15:06 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-10-04 20:15:06 +0200 |
commit | d81d584da5152af05c07f7842054a926aae20e10 (patch) | |
tree | 9e15be94f1f8d05cccdbd575d4d5f0bac8cad221 /tex/context/base/lpdf-ini.lua | |
parent | c9ac836b7b44d49c623ad8052639ca7beeaf1311 (diff) | |
download | context-d81d584da5152af05c07f7842054a926aae20e10.tar.gz |
2015-10-04 19:27:00
Diffstat (limited to 'tex/context/base/lpdf-ini.lua')
-rw-r--r-- | tex/context/base/lpdf-ini.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua index 834f845c5..99e533094 100644 --- a/tex/context/base/lpdf-ini.lua +++ b/tex/context/base/lpdf-ini.lua @@ -542,6 +542,13 @@ local function pdfconstant(str,default) return c end +local escaped = Cs((S(forbidden)/replacements + P(1))^0) +----- escaped = Cs((1-forbidden)^0 * S(forbidden)/replacements * ((S(forbidden)/replacements + P(1))^0) + +function lpdf.escaped(str) + return lpegmatch(escaped,str) or str +end + local p_null = { } setmetatable(p_null, mt_z) local p_true = { } setmetatable(p_true, mt_t) local p_false = { } setmetatable(p_false,mt_f) |