mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
improvement: add parser for format strings (#1021)
This PR implements the parser of format strings described in #624.
This commit is contained in:
+1
-1
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user