Skip to main content

embedded_script_sections

Function embedded_script_sections 

Source
pub fn embedded_script_sections(
    path: &Path,
    source: &str,
) -> Option<Vec<ScriptSection>>
Expand description

The inline script sections of a container file: the <script> blocks of a Vue or Svelte SFC, the frontmatter of an Astro component, or the import and export statements of an MDX document.

Returns None when path is not a container format. Then the caller parses the whole file.