(&self, f: &mut Formatter<'_>)
| 214 | } |
| 215 | |
| 216 | fn fmt_compacted(&self, f: &mut Formatter<'_>) -> Result { |
| 217 | let token = self.token(); |
| 218 | match token.kind() { |
| 219 | Kind::Whitespace => f.write_str(" "), |
| 220 | Kind::Ident | Kind::Function | Kind::AtKeyword | Kind::Hash |
| 221 | if self.should_compact && token.contains_escape_chars() => |
| 222 | { |
| 223 | self.fmt_compacted_ident(f) |
| 224 | } |
| 225 | Kind::Number => self.fmt_compacted_number(f), |
| 226 | Kind::Dimension => { |
| 227 | self.fmt_compacted_number(f)?; |
| 228 | self.fmt_compacted_ident(f) |
| 229 | } |
| 230 | Kind::Url => self.fmt_compacted_url(f), |
| 231 | _ => f.write_str(self.source), |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | fn fmt_compacted_number(&self, f: &mut Formatter<'_>) -> Result { |
| 236 | let value = self.token().value(); |
no test coverage detected