summaryrefslogtreecommitdiffstats
path: root/src/style.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-05-27 21:00:20 -0400
committerDan Davison <dandavison7@gmail.com>2020-05-27 21:00:20 -0400
commitdc3b9dbf08d3821942b6608524f6db4464ce081b (patch)
tree4f02ae2b2c12cda96feafd12c83f9ea54ce457c5 /src/style.rs
parent71c32c8628daf0dde3219bee7a678e57ed3ecd24 (diff)
Be more permissive: take first of multiple special attributes
Diffstat (limited to 'src/style.rs')
-rw-r--r--src/style.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/style.rs b/src/style.rs
index c015a7a0..746a391e 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -288,16 +288,10 @@ fn extract_special_decoration_attribute(style_string: &str) -> (String, Option<S
});
match special_attributes {
attrs if attrs.len() == 0 => (style_string.to_string(), None),
- attrs if attrs.len() == 1 => (standard_attributes.join(" "), Some(attrs[0].to_string())),
- attrs => {
- eprintln!(
- "Encountered multiple special attributes: {:?}. \
- You may supply no more than one of the special attributes 'box', 'underline', \
- and 'omit'.",
- attrs.join(", ")
- );
- process::exit(1);
- }
+ attrs => (
+ format!("{} {}", attrs[1..].join(" "), standard_attributes.join(" ")),
+ Some(attrs[0].to_string()),
+ ),
}
}