Interface: Snippet
Represents a code snippet extracted from a source file. The field permalink
is only present when the source is from a Git repository.
Table of contents
Properties
Properties
content
• content: string
The snippet content. Leading spaces are trimmed.
Defined in
endLine
• endLine: number
The end line of the snippet.
Defined in
filename
• filename: string
The name of the file, derived from sourcePath
.
Defined in
highlightedLines
• highlightedLines: number
[]
The lines to be highlighted, if any.
Defined in
language
• language: string
The source language. It matches the file extension.
Defined in
permalink
• Optional
permalink: string
The link to the file on the remote Git repo when available.
Defined in
qualifier
• Optional
qualifier: string
An extra qualifier that can be used to differentiate snippets with the same key that might come from the same file extension.
Defined in
sourcePath
• sourcePath: string
The file path relative to the working directory.
Defined in
startLine
• startLine: number
The start line of the snippet.