From dc3b9dbf08d3821942b6608524f6db4464ce081b Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 27 May 2020 21:00:20 -0400 Subject: Be more permissive: take first of multiple special attributes --- src/style.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/style.rs') 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 (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()), + ), } } -- cgit v1.2.3