mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 07:54:55 +00:00
AS2 indent fixed
This commit is contained in:
@@ -91,7 +91,7 @@ public class FunctionActionItem extends ActionItem {
|
||||
}
|
||||
ret += hilight(pname, highlight);
|
||||
}
|
||||
ret += hilight(")", highlight) + "\r\n" + hilight("{", highlight) + "\r\n" + Graph.graphToString(actions, highlight, constants) + "}";
|
||||
ret += hilight(")", highlight) + "\r\n" + hilight("{", highlight) + "\r\n" + Graph.graphToString(actions, highlight, constants) + hilight("}", highlight);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -2227,24 +2227,22 @@ public class Graph {
|
||||
if (strippedP.startsWith(":")) {
|
||||
continue;
|
||||
}
|
||||
if (Highlighting.stripHilights(parts[p]).equals(INDENTOPEN)) {
|
||||
strippedP = Highlighting.stripHilights(parts[p]).trim();
|
||||
if (strippedP.equals(INDENTOPEN)) {
|
||||
level++;
|
||||
continue;
|
||||
}
|
||||
if (Highlighting.stripHilights(parts[p]).equals(INDENTCLOSE)) {
|
||||
if (strippedP.equals(INDENTCLOSE)) {
|
||||
level--;
|
||||
continue;
|
||||
}
|
||||
if (Highlighting.stripHilights(parts[p]).equals("}")) {
|
||||
level--;
|
||||
}
|
||||
if (Highlighting.stripHilights(parts[p]).equals("};")) {
|
||||
if (strippedP.startsWith("}")) {
|
||||
level--;
|
||||
}
|
||||
ret.append(tabString(level));
|
||||
ret.append(parts[p]);
|
||||
ret.append("\r\n");
|
||||
if (Highlighting.stripHilights(parts[p]).equals("{")) {
|
||||
if (strippedP.equals("{")) {
|
||||
level++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user