mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-11 12:06:07 +00:00
LibCore: Enable emitting markdown from ArgsParser
ArgsParser will now automatically look for an environment variable 'ARGSPARSER_EMIT_MARKDOWN', and if it is set to exactly the string "1" (i.e. mere presence or values like "ON" or "yes" are not enough), then ArgsParser will emit a Markdown-formatted help message, instead of the regular help message designed for consumption through a terminal.
This commit is contained in:
parent
d2f9fee4ab
commit
0372f051e9
Notes:
sideshowbarker
2024-07-18 01:38:39 +09:00
Author: https://github.com/BenWiederhake
Commit: 0372f051e9
Pull-request: https://github.com/SerenityOS/serenity/pull/10655
Reviewed-by: https://github.com/linusg
2 changed files with 85 additions and 0 deletions
|
@ -58,6 +58,8 @@ public:
|
|||
void set_general_help(const char* help_string) { m_general_help = help_string; };
|
||||
void set_stop_on_first_non_option(bool stop_on_first_non_option) { m_stop_on_first_non_option = stop_on_first_non_option; }
|
||||
void print_usage(FILE*, const char* argv0);
|
||||
void print_usage_terminal(FILE*, const char* argv0);
|
||||
void print_usage_markdown(FILE*, const char* argv0);
|
||||
void print_version(FILE*);
|
||||
|
||||
void add_option(Option&&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue