diff options
Diffstat (limited to 'tex/context/base/mkiv/util-str.lua')
-rw-r--r-- | tex/context/base/mkiv/util-str.lua | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tex/context/base/mkiv/util-str.lua b/tex/context/base/mkiv/util-str.lua index 67146d80f..471b76296 100644 --- a/tex/context/base/mkiv/util-str.lua +++ b/tex/context/base/mkiv/util-str.lua @@ -624,22 +624,24 @@ return function(%s) return %s end -- We only use fast serialize in controlled cases. --- local pattern = Cs(Cc('"') * ( --- (1-S('"\\\n\r'))^1 --- + P('"') / '\\"' --- + P('\\') / '\\\\' --- + P('\n') / '\\n' --- + P('\r') / '\\r' --- )^0 * Cc('"')) - local pattern = Cs(Cc('"') * ( (1-S('"\\\n\r'))^1 - + P('"') / '\\034' - + P('\\') / '\\092' - + P('\n') / '\\013' - + P('\r') / '\\010' + + P('"') / '\\"' + + P('\\') / '\\\\' + + P('\n') / '\\n' + + P('\r') / '\\r' )^0 * Cc('"')) +-- -- I need to do more experiments with this: +-- +-- local pattern = Cs(Cc('"') * ( +-- (1-S('"\\\n\r'))^1 +-- + P('"') / '\\034' +-- + P('\\') / '\\092' +-- + P('\n') / '\\013' +-- + P('\r') / '\\010' +-- )^0 * Cc('"')) + patterns.escapedquotes = pattern function string.escapedquotes(s) |