diff options
author | Zhenhui Xie <xiezh0831@yahoo.co.jp> | 2020-04-07 01:16:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 13:16:18 -0400 |
commit | 22dc419a3e0bee5d9a7ea72900b8503e9bd014fc (patch) | |
tree | b3102feac3af53c2e0f4e818583ae6e8bf379cbb /src/config.rs | |
parent | 3510bfe0444c2bf4e8cf3e42fdf13fde8c05568f (diff) |
improvement: add parser for format strings (#1021)
This PR implements the parser of format strings described in #624.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index d3f868f16..235351556 100644 --- a/src/config.rs +++ b/src/config.rs @@ -305,7 +305,7 @@ impl Default for SegmentConfig<'static> { - 'italic' - '<color>' (see the parse_color_string doc for valid color strings) */ -fn parse_style_string(style_string: &str) -> Option<ansi_term::Style> { +pub fn parse_style_string(style_string: &str) -> Option<ansi_term::Style> { style_string .split_whitespace() .fold(Some(ansi_term::Style::new()), |maybe_style, token| { |