summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/util-str.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-08-10 13:15:31 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-08-10 13:15:31 +0200
commitd3d93bc4f0d21a259fdafee5ba1a744999474c28 (patch)
tree433bd6ca86fd62a858e086bee7c5abf412c16845 /tex/context/base/mkiv/util-str.lua
parent06f5d61e0db05d0803ac5b6b4953937c3b88f1ea (diff)
downloadcontext-d3d93bc4f0d21a259fdafee5ba1a744999474c28.tar.gz
2021-08-10 12:39:00
Diffstat (limited to 'tex/context/base/mkiv/util-str.lua')
-rw-r--r--tex/context/base/mkiv/util-str.lua26
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)