Skip to main content

extract_sfc_styles

Function extract_sfc_styles 

Source
pub fn extract_sfc_styles(source: &str) -> Vec<SfcStyle>
Expand description

Extract all <style> blocks from a Vue/Svelte SFC source string.

Mirrors extract_sfc_scripts: filters blocks inside HTML comments and captures the lang and src attributes so the caller can route the body to the right preprocessor’s import scanner (currently only CSS / SCSS / Sass) or seed the src reference as a side-effect import.