Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function normalize(text) {
var indentation = '\t';
if (!Editor.getUseTabChar()) {
indentation = '';
var units = Editor.getSpaceUnits();
while (units--) {
indentation += ' ';
}
}
return editorUtils.normalize(text, {
indentation: indentation,
newline: '\n'
});
}