Trim whitespace at the end of the context menu line

This commit is contained in:
Christoph Heinrich
2022-07-20 03:34:12 +02:00
committed by Tomas Klaen
parent 1de5c78aa8
commit 77550ef999

View File

@@ -2837,9 +2837,9 @@ state.context_menu_items = (function()
local submenus_by_id = {}
for line in io.lines(input_conf_path) do
local key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#!%s*(.*)')
local key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#!%s*(.-)%s*$')
if not key then
key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#menu:%s*(.*)')
key, command, title = string.match(line, '%s*([%S]+)%s+(.*)%s#menu:%s*(.-)%s*$')
end
if key then
local is_dummy = key:sub(1, 1) == '#'