diff options
author | David Carlisle <d.p.carlisle@gmail.com> | 2015-11-21 21:45:03 +0000 |
---|---|---|
committer | David Carlisle <d.p.carlisle@gmail.com> | 2015-11-21 21:45:03 +0000 |
commit | b46f13e0949e310b46e97e791fd4e9e38635a491 (patch) | |
tree | 415c893c82e7f55ed630a10033885f1b5781ab56 /src/fontloader/misc/fontloader-l-string.lua | |
parent | a472b6fd5461318ec1e5d2899af2ef57f0fb14e8 (diff) | |
parent | 6c3d70e21b100c6c7ffa11e1c6d9260b32ccc781 (diff) | |
download | luaotfload-b46f13e0949e310b46e97e791fd4e9e38635a491.tar.gz |
for 2.6
Diffstat (limited to 'src/fontloader/misc/fontloader-l-string.lua')
-rw-r--r-- | src/fontloader/misc/fontloader-l-string.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fontloader/misc/fontloader-l-string.lua b/src/fontloader/misc/fontloader-l-string.lua index 70c66f6..e9dc2bb 100644 --- a/src/fontloader/misc/fontloader-l-string.lua +++ b/src/fontloader/misc/fontloader-l-string.lua @@ -192,10 +192,11 @@ string.itself = function(s) return s end -- also handy (see utf variant) -local pattern = Ct(C(1)^0) -- string and not utf ! +local pattern_c = Ct( C(1) ^0) -- string and not utf ! +local pattern_b = Ct((C(1)/byte)^0) -function string.totable(str) - return lpegmatch(pattern,str) +function string.totable(str,bytes) + return lpegmatch(bytes and pattern_b or pattern_c,str) end -- handy from within tex: |