diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-01-02 20:09:30 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-01-02 20:09:30 -0500 |
commit | 0feb0ebd512218300473d8515c3ee171ba6dc20e (patch) | |
tree | fda5f53e5da90a97503a4677e962bb5dc155c47b | |
parent | d9c04a526021f06e48cf93543614a0df3ec6f9fa (diff) | |
download | lite-xl-plugin-manager-0feb0ebd512218300473d8515c3ee171ba6dc20e.tar.gz lite-xl-plugin-manager-0feb0ebd512218300473d8515c3ee171ba6dc20e.zip |
Changed sorting.v0.95
-rw-r--r-- | src/lpm.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 85daa12..b131807 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1781,7 +1781,7 @@ in any circumstance unless explicitly supplied. end if ARGS[2] == "table" then local plugins = json.decode(common.read(ARGS[3]))["plugins"] - table.sort(plugins, function(a,b) return string.lower(a.id) < string.lower(b.id) end) + table.sort(plugins, function(a,b) return string.lower(a.name or a.id) < string.lower(b.name or b.id) end) local ids = common.map(plugins, function(plugin) if plugin.path and plugin.path:find(".lua$") then return string.format("[`%s`](%s?raw=1)", plugin.name or plugin.id, plugin.path) end if plugin.path then return string.format("[`%s`](%s)", plugin.name or plugin.id, plugin.path) end |