Skip to content

Commit

Permalink
[GR-59103] Fix indentation in option help text spanning multiple line…
Browse files Browse the repository at this point in the history
…s in util.args

PullRequest: graal/19209
  • Loading branch information
c-refice authored and tkrodriguez committed Nov 6, 2024
2 parents 48a61fe + 06ace47 commit 4356cb0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ public String getUsage() {

static final String INDENT = " ";

static void printIndented(PrintWriter writer, String string, int indentLevel) {
private static void printIndentedLine(PrintWriter writer, String line, int indentLevel) {
for (int i = 0; i <= indentLevel; ++i) {
writer.append(INDENT);
}
writer.println(string);
writer.println(line);
}

static void printIndented(PrintWriter writer, String string, int indentLevel) {
string.lines().forEach(line -> printIndentedLine(writer, line, indentLevel));
}

public void printHelp(PrintWriter writer, int indentLevel) {
Expand Down

0 comments on commit 4356cb0

Please sign in to comment.