diff options
-rw-r--r-- | src/style.rs | 2 | ||||
-rw-r--r-- | src/tests/test_example_diffs.rs | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/style.rs b/src/style.rs index 22529bc5..a5981743 100644 --- a/src/style.rs +++ b/src/style.rs @@ -176,6 +176,7 @@ impl DecorationStyle { Some("ul") => DecorationStyle::Underline(style), Some("overline") => DecorationStyle::Overline(style), Some("underoverline") => DecorationStyle::Underoverline(style), + Some("none") => DecorationStyle::NoDecoration, Some("omit") => DecorationStyle::NoDecoration, Some("plain") => DecorationStyle::NoDecoration, // TODO: Exit with error if --thing-decoration-style supplied without a decoration type @@ -296,6 +297,7 @@ fn extract_special_decoration_attribute(style_string: &str) -> (String, Option<S || token == "underline" || token == "overline" || token == "underoverline" + || token == "none" || token == "plain" }); match special_attributes { diff --git a/src/tests/test_example_diffs.rs b/src/tests/test_example_diffs.rs index 43b94680..5ee26956 100644 --- a/src/tests/test_example_diffs.rs +++ b/src/tests/test_example_diffs.rs @@ -591,6 +591,13 @@ src/align.rs } #[test] + fn test_hunk_header_decoration_style_none() { + let mut options = integration_test_utils::get_command_line_options(); + options.hunk_header_decoration_style = "none".to_string(); + _do_test_hunk_header_style_no_decoration(options); + } + + #[test] fn test_hunk_header_decoration_style_empty_string() { let mut options = integration_test_utils::get_command_line_options(); options.hunk_header_decoration_style = "".to_string(); |