pub fn detect_embedded_regions(
text: &str,
language: &str,
policy: RegionDetectionPolicy,
) -> Vec<EmbeddedRegion>Expand description
Embedded regions of text in host language, in source order.
The host is parsed with its registered grammar and its CST read by
detect_embedded_regions_in_tree. Mirrors detectEmbeddedRegions in
js/src/regions.js: a txt document is one region, and a host other than
HTML or Markdown has none.