matlab-formatter-vscode
matlab-formatter-vscode copied to clipboard
error with dealing the 'end' in index position
The formater does not perform well in such a snippet
for i = 1:22
if i > 3 && i < a(end - 1)
break
else
continue
end
end
Wrongly format to
for i = 1:22
if i > 3 && i < a( end - 1)
break
else
continue
end
end
In addition, behave well in quite a similar code
for i = 1:22
if i > 3 && i < a(end)
break
else
continue
end
end
I am having the same issue, would be great if this is fixed