StyLua icon indicating copy to clipboard operation
StyLua copied to clipboard

reversability issue in inspect.lua from luvit

Open matthargett opened this issue 3 years ago • 0 comments

https://github.com/kikito/inspect.lua/blob/master/inspect.lua

reduction:

local function escape(str)
	return (str:gsub("\\", "\\\\"):gsub("(%c)%f[0-9]", longControlCharEscapes):gsub("%c", shortControlCharEscapes))
end

with a 100 column width limit, running stylua 0.14.2 on the file twice has an effect. without the 100 column limit (defaulting to 120), it also has unstable formatting on the second format, but it doesn't reverse like it does at the 100 column limit.

matthargett avatar Jul 28 '22 16:07 matthargett