process

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pre

func Pre(content string) string

Pre processes the markdown content by executing the commands necessary and returns the new processed content

Types

type Block

type Block struct {
	Command string
	Input   string
	Output  string
	Raw     string
}

Block represents a pre-processable block which looks like the following: It is delimited by ~~~ and contains a command to be run along with the input to be passed, the entire block should be replaced with its command output

~~~sd block process block ~~~

func Parse

func Parse(markdown string) []Block

Parse takes some markdown and returns blocks to be pre-processed

func (*Block) Execute

func (b *Block) Execute()

Execute takes performs the execution of the block's command by passing in the block's input as stdin and sets the block output

func (Block) String

func (b Block) String() string

String implements the Stringer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL