Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateBoundary() string
- func Render(w io.Writer, nb *notebook.Notebook, opts ...RenderOpt) error
- func ToSideNote(id, content []byte) []byte
- type FootnoteRenderer
- type RenderOpt
- type Renderer
- func (r *Renderer) Elide(tags []string) (cell bool, source bool, output bool)
- func (r *Renderer) GetDefaultLang() string
- func (r *Renderer) GetResource(contentHash string) *notebook.Resource
- func (r *Renderer) GetResources() map[string]*notebook.Resource
- func (r *Renderer) RenderNB(nb *notebook.Notebook) error
- func (r *Renderer) SetMetadata(metadata notebook.MetaData)
- func (r *Renderer) WriteB64Image(fig *notebook.Base64Figure) (string, error)
- func (r *Renderer) WriteHTMLEscapedLines(lines []string) error
- func (r *Renderer) WriteHTMLUnsafely(lines []string) error
- func (r *Renderer) WriteMarkdownCodeFenced(lang string, lines []string) error
- func (r *Renderer) WriteMarkdownLines(lines []string) error
- func (r *Renderer) WriteOutputs(outputs []notebook.Output) error
- func (r *Renderer) WritePlainText(class string, lines []string, clean bool) error
- type TaskListRenderer
Constants ¶
View Source
const SideNoteFmt = `` /* 148-byte string literal not displayed */
Variables ¶
View Source
var ( DefaultRemoveCellTags = map[string]bool{"remove_cell": true, "private": true, "setup": true, "notes": true, "hidden": true} DefaultRemoveInputTags = map[string]bool{"remove_input": true, "output-generator": true} DefaultRemoveOutputTags = map[string]bool{"remove_output": true, "assertion": true} )
View Source
var MarkdownHeaderRegexp = regexp.MustCompile(`^(#+)\s+(.+)`)
Functions ¶
func GenerateBoundary ¶
func GenerateBoundary() string
func ToSideNote ¶
Types ¶
type FootnoteRenderer ¶
type FootnoteRenderer struct {
// contains filtered or unexported fields
}
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
func (*Renderer) GetDefaultLang ¶
func (*Renderer) GetResource ¶
func (*Renderer) SetMetadata ¶
func (*Renderer) WriteB64Image ¶
func (r *Renderer) WriteB64Image(fig *notebook.Base64Figure) (string, error)
func (*Renderer) WriteHTMLEscapedLines ¶
func (*Renderer) WriteHTMLUnsafely ¶
func (*Renderer) WriteMarkdownCodeFenced ¶
func (*Renderer) WriteMarkdownLines ¶
type TaskListRenderer ¶
type TaskListRenderer struct {
// contains filtered or unexported fields
}
func (*TaskListRenderer) IsEngaged ¶
func (tlr *TaskListRenderer) IsEngaged() bool
func (*TaskListRenderer) Render ¶
func (tlr *TaskListRenderer) Render(w io.Writer, rawNode ast.Node, entering bool) (ast.WalkStatus, bool)
See: https://github.blog/2014-04-28-task-lists-in-all-markdown-documents/
Click to show internal directories.
Click to hide internal directories.