mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 14:38:49 +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;
|
return null;
|
||||||
}
|
}
|
||||||
final Tag.Argument t = arguments.popOr("Missing option 1");
|
final Tag.Argument t = arguments.popOr("Missing option 1");
|
||||||
final Tag.Argument f = arguments.popOr("Missing option 2");
|
String f = "";
|
||||||
return Tag.preProcessParsed(this.state ? t.value() : f.value());
|
if (arguments.peek() != null) {
|
||||||
|
f = arguments.pop().value();
|
||||||
|
}
|
||||||
|
return Tag.preProcessParsed(this.state ? t.value() : f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user