Open Wave89 opened 1 year ago
Similarly, it doesn't get the end
correct (indents it too far).
WORKAROUND: Use the formatFile
function instead,
Need to exclude words here that are part of a string: https://github.com/davidvarga/MBeautifier/blob/0f90feb8fd5b93185eabfdaaa6abf26bf6cda7d0/%2BMBeautifier/MIndenter.m#L70
if there keywords like "if", "while", "for", "function" in comments (e.g. "% this should be done while ...") , strings (e.g. variable1 ="while the sun is shining") or commands (e.g. "dbstop if error") the function formatFileNoEditor is not working properly with indentation.