mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
allow omitting the false option in option tags (will use empty text)
This commit is contained in:
1 file changed
+5
-2
@@ -45,8 +45,11 @@ public final class OptionTagResolver implements TagResolver {
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user