Record

Selection

Module PuduLangDocgen.Markdown.Snippet

type Selection = {
  path: Str,
  region: Str,
  ranges: Array[(Int, Int)],
  highlight: Array[(Int, Int)],
  dedent: Int
}

View source

Which lines of a source file an excerpt shows

Fields

Name Type Description
path Str
region Str
ranges Array[(Int, Int)]
highlight Array[(Int, Int)]
dedent Int
Name Description
selection The file path and selection written in an excerpt destination. `#name` selects a region, `#L3-L9` a line range; `?name=`, `?range=`, `?highlight=` and `?dedent=` refine it.
extract The excerpt a selection takes from file text and the output lines it emphasizes. Region markers inside the excerpt are removed; common indentation is removed unless `dedent` names an exact amount.