type mdPrinter … // Markdown returns a Markdown formatting of the Doc. // See the [Printer] documentation for ways to customize the Markdown output. func (p *Printer) Markdown(d *Doc) []byte { … } // block prints the block x to out. func (p *mdPrinter) block(out *bytes.Buffer, x Block) { … } // text prints the text sequence x to out. func (p *mdPrinter) text(out *bytes.Buffer, x []Text) { … } // rawText prints the text sequence x to out, // without worrying about escaping characters // that have special meaning at the start of a Markdown line. func (p *mdPrinter) rawText(out *bytes.Buffer, x []Text) { … } // escape prints s to out as plain text, // escaping special characters to avoid being misinterpreted // as Markdown markup sequences. func (p *mdPrinter) escape(out *bytes.Buffer, s string) { … }