@@ -799,11 +799,11 @@ i8_save_indent_in_conditional_branch:
799799 for (var i in tokens) {
800800 var type = tokens[i].type
801801 var content = tokens[i].content.toLowerCase()
802- if (type == Token.MACRO_SKIP && content.startsWith ("$if ")) {
802+ if (type == Token.MACRO_SKIP && content.indexOf ("$if ") == 0 ) {
803803 withinFirstBranch = true;
804804 continue;
805805 }
806- if (withinFirstBranch && type == Token.MACRO_SKIP && content.startsWith ("$")) {
806+ if (withinFirstBranch && type == Token.MACRO_SKIP && content.indexOf ("$") == 0 ) {
807807 withinFirstBranch = false;
808808 continue;
809809 }
@@ -2552,7 +2552,7 @@ r5_commas:
25522552 struct.putNewline(commaNode.from, getIndentForComma(indentNextNode));
25532553 logger.fine(struct.getClass(), "r5_commas: fix indent before comma at " + commaNode.from + ".");
25542554 var comment = getLastCommentBetweenPos(commaNode.from-1, commaNode.to);
2555- if (comment != null && comment.startsWith ("--")) {
2555+ if (comment != null && comment.indexOf ("--") == 0 ) {
25562556 // we must not remove the newline after a single-line comment (belongs to the single line comment)
25572557 } else {
25582558 // remove all whitespace before node
@@ -4026,7 +4026,7 @@ a18_indent_comment:
40264026 var getIndentBefore = function(pos) {
40274027 var indent = getIndent(pos);
40284028 var content = target.src.get(pos).content.toLowerCase();
4029- if (content.startsWith ("end")) {
4029+ if (content.indexOf ("end") == 0 ) {
40304030 indent += getSpaces(indentSpaces);
40314031 if (target.src.get(pos+1).content.toLowerCase() == "case") {
40324032 indent += getSpaces(indentSpaces);
0 commit comments