(document: &mut Document, node_id: NodeId, new_css: &str)
| 337 | } |
| 338 | |
| 339 | fn overwrite_style_node(document: &mut Document, node_id: NodeId, new_css: &str) { |
| 340 | let new_css = new_css.trim(); |
| 341 | if let Some(text_node_id) = document[node_id].first_child { |
| 342 | if let NodeData::Text { text } = &mut document[text_node_id].data { |
| 343 | text.clear(); |
| 344 | text.push_slice(new_css); |
| 345 | } |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | impl<'a> InlineOptions<'a> { |
| 350 | /// Override whether "style" tags should be inlined. |
no outgoing calls
no test coverage detected