createSnippet

fun createSnippet(indentSize: Int = 4, maxLength: Int = 75): String(source)

Create readable YAML snippet of codepoints, with a caret ^ pointing at pointer.

Only a single line will be rendered. Content before or after a linebreak will not be shown.

Lines longer than maxLength will be truncated, using SNIPPET_OVERFLOW to indicate truncation.

Return

readable Piece of YAML that highlights a .

Parameters

indentSize

The number of spaces to indent the snippet.

maxLength

Limit the result to this many characters.