Documentation ¶
Index ¶
- Constants
- func DumpAttributes(n ast.Node, source []byte) map[string]interface{}
- func DumpToMap(node ast.Node, source []byte, root string) *map[string]interface{}
- func PrefixAttributeName(prefix, name string) string
- func Serialize(notebook *Notebook) ([]byte, error)
- type Cell
- type CellKind
- type Notebook
- type TextRange
Constants ¶
View Source
const ( InternalAttributePrefix = "runme.dev" PrivateAttributePrefix = "_" )
View Source
const FrontmatterKey = "frontmatter"
Variables ¶
This section is empty.
Functions ¶
func DumpAttributes ¶ added in v1.8.0
func PrefixAttributeName ¶ added in v1.2.3
Types ¶
type Cell ¶
type Cell struct { Kind CellKind `json:"kind"` Value string `json:"value"` LanguageID string `json:"languageId"` Metadata map[string]string `json:"metadata,omitempty"` TextRange *TextRange `json:"textRange,omitempty"` }
Cell resembles NotebookCellData from VS Code. https://github.com/microsoft/vscode/blob/085c409898bbc89c83409f6a394e73130b932add/src/vscode-dts/vscode.d.ts#L13715
type Notebook ¶
type Notebook struct { Cells []*Cell `json:"cells"` Metadata map[string]string `json:"metadata,omitempty"` // contains filtered or unexported fields }
Notebook resembles NotebookData form VS Code. https://github.com/microsoft/vscode/blob/085c409898bbc89c83409f6a394e73130b932add/src/vscode-dts/vscode.d.ts#L13767
func (*Notebook) GetContentOffset ¶ added in v1.2.0
func (*Notebook) ParsedFrontmatter ¶ added in v1.2.1
func (n *Notebook) ParsedFrontmatter() (document.Frontmatter, *document.FrontmatterParseInfo)
Click to show internal directories.
Click to hide internal directories.