summaryrefslogtreecommitdiff
path: root/tex/context/base/char-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-09-21 13:53:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-09-21 13:53:00 +0200
commitfff0f2637579a3259e5da3e8c36436f0ab89aa23 (patch)
treef548ed1f2ddf387beaf9593bd69865528bb84a6c /tex/context/base/char-ini.lua
parent6ffb17c8781eb0db5f29cb6a44b47e5bf83c2c1d (diff)
downloadcontext-fff0f2637579a3259e5da3e8c36436f0ab89aa23.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