aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-04-21 11:37:10 -0400
committerAdam Harrison <adamdharrison@gmail.com>2024-04-21 11:37:10 -0400
commitd29296812a8383cb15dcc517347803eadf073a9c (patch)
tree727f9ae4fab8b9d805bae65ab3c852826486f2d9 /src/lpm.lua
parent6762e50e3b49f759bba6ef4deb913af5986e964d (diff)
downloadlite-xl-plugin-manager-d29296812a8383cb15dcc517347803eadf073a9c.tar.gz
lite-xl-plugin-manager-d29296812a8383cb15dcc517347803eadf073a9c.zip
Made URL more sensible.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 8cdcaf2..457fa06 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1920,11 +1920,11 @@ local function print_addon_info(type, addons, filters)
local result = { [plural] = { } }
for j,addon in ipairs(addons) do
max_id = math.max(max_id, #addon.id)
- local url = addon.name and addon.name ~= addon.id and string.format("%s (`%s`)", addon.name, addon.id) or ("`" .. addon.id .. "`")
- if addon.remote then url = string.format("[%s](%s)\\*", url, addon.remote:gsub(":%w+$", ""))
- elseif addon.url then url = string.format("[%s](%s)\\*", url, addon.url)
- elseif addon.path and addon.path:find(".lua$") then url = string.format("[%s](%s?raw=1)", url, addon.path)
- elseif addon.path then url = string.format("[%s](%s)", url, addon.path) end
+ local url
+ if addon.remote then url = addon.remote:gsub(":%w+$", "")
+ elseif addon.url then url = addon.url
+ elseif addon.path and addon.path:find(".lua$") then url = string.format("%s?raw=1", addon.path)
+ elseif addon.path then url = addon.path end
local hash = {
id = addon.id,
status = addon.repository and (addon:is_installed(system_bottle) and "installed" or (system_bottle.lite_xl:is_compatible(addon) and "available" or "incompatible")) or (addon:is_bundled(system_bottle) and "bundled" or (addon:is_core(system_bottle) and "core" or (addon:is_upgradable(system_bottle) and "upgradable" or "orphan"))),