MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / handle_empty_remainder

Function handle_empty_remainder

css-inline/src/lib.rs:294–306  ·  view source on GitHub ↗
(
    document: &mut Document,
    chunk: &CssChunk,
    requested_keep_style_tags: bool,
)

Source from the content-addressed store, hash-verified

292}
293
294fn handle_empty_remainder(
295 document: &mut Document,
296 chunk: &CssChunk,
297 requested_keep_style_tags: bool,
298) {
299 if let Some(node_id) = chunk.style_node {
300 if requested_keep_style_tags {
301 overwrite_style_node(document, node_id, "");
302 } else {
303 document.detach_node(node_id);
304 }
305 }
306}
307
308fn append_rule<'i>(
309 buffer: &mut String,

Callers 1

rewrite_style_blocksFunction · 0.85

Calls 2

overwrite_style_nodeFunction · 0.85
detach_nodeMethod · 0.80

Tested by

no test coverage detected