Module
PuduLangDocgen.Markdown.Snippet
Code excerpts selected by region, range, and emphasis
Types
| Name | Description |
|---|---|
Selection |
Which lines of a source file an excerpt shows |
Functions
| 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. |
ranges |
Line ranges written as `3`, `3-9`, or `12-`, separated by commas. |
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. |
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.
Parameters
destinationStr
Returns
Result[Selection, Str]
ranges
fn ranges(written: Str) -> Result[Array[(Int, Int)], Str]
Line ranges written as 3, 3-9, or 12-, separated by commas.
Parameters
writtenStr
Returns
Result[Array[(Int, Int)], Str]
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.
Parameters
textStrchosen&Selection
Returns
Result[(Str, Array[Int]), Str]