Changeset

10504:1f80e5ad3cea

mod_admin_telnet: Fix host sorting Reversing each %P is a noop
author Kim Alvefur <zash@zash.se>
date Sun, 15 Dec 2019 20:43:02 +0100
parents 10503:e25a1a9a6e7e
children 10505:142bdba5eea2
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sat Dec 14 22:47:41 2019 +0100
+++ b/plugins/mod_admin_telnet.lua	Sun Dec 15 20:43:02 2019 +0100
@@ -965,7 +965,7 @@
 end
 
 local function compare_hosts(a, b)
-	return a:gsub("%P", string.reverse):reverse() < b:gsub("%P", string.reverse):reverse();
+	return a:gsub("%P+", string.reverse):reverse() < b:gsub("%P+", string.reverse):reverse();
 end
 
 function def_env.host:list()