gotools/cmd/present2md/main.go

func usage() {}

var writeBack

var exitStatus

func main() {}

// convert reads the data from r, parses it as legacy present,
// and converts it to Markdown-enabled present.
// If any errors occur, the data is reported as coming from file.
// If writeBack is true, the converted version is written back to file.
// If writeBack is false, the converted version is printed to standard output.
func convert(r io.Reader, file string, writeBack bool) error {}

func printSectionBody(file string, depth int, w *bytes.Buffer, elems []present.Elem) {}

func markdownEscape(s string, startLine bool) string {}

func printStyled(w *bytes.Buffer, text string, startLine bool) {}

// font returns s with font indicators turned into HTML font tags.
func font(s string, startLine bool) string {}

// split is like strings.Fields but also returns the runs of spaces
// and treats inline links as distinct words.
func split(s string) []string {}

// parseInlineLink parses an inline link at the start of s, and returns
// a rendered Markdown link and the total length of the raw inline link.
// If no inline link is present, it returns all zeroes.
func parseInlineLink(s string) (link string, length int) {}

func renderLink(href, text string) string {}