summaryrefslogtreecommitdiff
path: root/tex/context/base/char-ini.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-09-21 15:00:24 +0300
committerMarius <mariausol@gmail.com>2013-09-21 15:00:24 +0300
commit8e052e94b8b3ca08900ab4fe0a5bf110f6a52327 (patch)
treed4069443434000edeff4d9e2016ed8372dfa4656 /tex/context/base/char-ini.lua
parent90e0ebf75e9e0b86addd68dfe2f26fb8c4525bf9 (diff)
downloadcontext-8e052e94b8b3ca08900ab4fe0a5bf110f6a52327.tar.gz
beta 2013.09.21 13:53
Diffstat (limited to 'tex/context/base/char-ini.lua')
-rw-r--r--tex/context/base/char-ini.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua
index 625996033..7548650e6 100644
--- a/tex/context/base/char-ini.lua
+++ b/tex/context/base/char-ini.lua
@@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['char-ini'] = {
-- we can remove the tag range starting at 0xE0000 (special applications)
-local utfchar, utfbyte, utfvalues, ustring = utf.char, utf.byte, utf.values, utf.ustring
+local utfchar, utfbyte, utfvalues, ustring, utotable = utf.char, utf.byte, utf.values, utf.ustring, utf.totable
local concat, unpack, tohash = table.concat, table.unpack, table.tohash
local next, tonumber, type, rawget, rawset = next, tonumber, type, rawget, rawset
local format, lower, gsub, match, gmatch = string.format, string.lower, string.gsub, string.match, string.match, string.gmatch
@@ -948,8 +948,19 @@ end
local tracedchars = utilities.strings.tracers
tracedchars[0x00] = "[signal]"
+tracedchars[0x0A] = "[linefeed]"
+tracedchars[0x0B] = "[tab]"
+tracedchars[0x0C] = "[formfeed]"
+tracedchars[0x0D] = "[return]"
tracedchars[0x20] = "[space]"
+function characters.showstring(str)
+ local list = utotable(str)
+ for i=1,#list do
+ report_defining("split % 3i : %C",i,list[i])
+ end
+end
+
-- the following code will move to char-tex.lua
-- tex