Skip to content

Commit

Permalink
allow omitting the false option in option tags (will use empty text)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Oct 5, 2023
1 parent d196931 commit d331d39
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ public OptionTagResolver(final String name, final boolean state) {
return null;
}
final Tag.Argument t = arguments.popOr("Missing option 1");
final Tag.Argument f = arguments.popOr("Missing option 2");
return Tag.preProcessParsed(this.state ? t.value() : f.value());
String f = "";
if (arguments.peek() != null) {
f = arguments.pop().value();
}
return Tag.preProcessParsed(this.state ? t.value() : f);
}

@Override
Expand Down

0 comments on commit d331d39

Please sign in to comment.