competitest.nvim
competitest.nvim copied to clipboard
Add functionality to ignore periods and replace spaces with underscore in the filename
Prevoiusly the filename was something like this
I've added this function in the receive.lua file to modify the filename so that it:
- Replace spaces with underscores
- Remove periods
-- New function to process the problem name
local function process_problem_name(name)
name = name:gsub("%s+", "_") -- Replace spaces with underscores
name = name:gsub("%.", "") -- Remove periods
return name
end
I also changed the PROBLEM var in receive_modifiers from this
["PROBLEM"] = task.name, -- problem name, name field
to
["PROBLEM"] = process_problem_name(task.name), -- problem name, name field, processed
this.
And now the filename look like this: