diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2024-03-29 11:28:38 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2024-03-29 11:28:38 -0400 |
commit | 6fa5bb7b3fb6f9bb11f0f0a21f24de8376345880 (patch) | |
tree | f84b070a5c7f89bc1ec5b1647bce0c2075eb644e | |
parent | 42394eed8c1b73070f62531f590ddeb253ab32a4 (diff) | |
download | lite-xl-plugin-manager-6fa5bb7b3fb6f9bb11f0f0a21f24de8376345880.tar.gz lite-xl-plugin-manager-6fa5bb7b3fb6f9bb11f0f0a21f24de8376345880.zip |
Fixed handleization.
-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 1622119..9217282 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -405,7 +405,7 @@ function common.split(splitter, str) return table.unpack(res) end -function common.handleize(str) return str:lower():gsub("%s+", "-"):gsub("%-+", "-"):gsub("[^a-z0-9%-_]", ""):gsub("^%-+", ""):gsub("%-+$", "") end +function common.handleize(str) return str:lower():gsub("[^a-z0-9%-_]+", "-"):gsub("%-+", "-"):gsub("^%-+", ""):gsub("%-+$", "") end function common.is_commit_hash(hash) return #hash == 40 and not hash:find("[^a-f0-9]") end function common.dirname(path) local s = path:reverse():find("[/\\]") if not s then return path end return path:sub(1, #path - s) end function common.basename(path) local s = path:reverse():find("[/\\]") if not s then return path end return path:sub(#path - s + 2) end |