summaryrefslogtreecommitdiff
path: root/tex/context/base/sort-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/sort-ini.lua')
-rw-r--r--tex/context/base/sort-ini.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua
index a6181f5e4..aa3caff96 100644
--- a/tex/context/base/sort-ini.lua
+++ b/tex/context/base/sort-ini.lua
@@ -528,8 +528,9 @@ local function numify(s)
end
function sorters.strip(str) -- todo: only letters and such
- if str then
- str = gsub(str,"\\[\"\'~^`]*","") -- \"e
+ if str and str ~= "" then
+ -- todo: make a lpeg
+ str = gsub(str,"\\[\"\'~^`]*","") -- \"e -- hm, too greedy
str = gsub(str,"\\%S*","") -- the rest
str = gsub(str,"%s","\001") -- can be option
str = gsub(str,"[%s%[%](){}%$\"\']*","")