func (e *plainText) WriteTo(w io.Writer) (int64, error) {
	var bf bytes.Buffer

	// Write the plain text.
	bf.WriteString(strings.Join(e.ln.tokens[1:], space))

	if len(e.ln.tokens) > 1 && e.insertBr {
		bf.WriteString(htmlBr)
	}

	// Write the children's HTML.
	if len(e.children) > 0 {
		bf.WriteString(lf)

		if i, err := e.writeChildren(&bf); err != nil {
			return i, err
		}
	}

	// Write the buffer.
	i, err := w.Write(bf.Bytes())

	return int64(i), err
}
func (e *plainText) WriteTo(w io.Writer) (int64, error) {
	var bf bytes.Buffer

	
	bf.WriteString(strings.Join(e.ln.tokens[1:], space))

	if len(e.ln.tokens) > 1 && e.insertBr {
		bf.WriteString(htmlBr)
	}

	
	if len(e.children) > 0 {
		bf.WriteString(lf)

		if i, err := e.writeChildren(&bf); err != nil {
			return i, err
		}
	}

	
	i, err := w.Write(bf.Bytes())

	return int64(i), err
}
func ( e * plainText ) WriteTo ( w io . Writer ) ( int64 , error ) { var bf bytes . Buffer // Write the plain text. bf . WriteString ( strings . Join ( e . ln . tokens [ 1 : ] , space ) ) if len ( e . ln . tokens ) > 1 && e . insertBr { bf . WriteString ( htmlBr ) } // Write the children's HTML. if len ( e . children ) > 0 { bf . WriteString ( lf ) if i , err := e . writeChildren ( & bf ) ; err != nil { return i , err } } // Write the buffer. i , err := w . Write ( bf . Bytes ( ) ) return int64 ( i ) , err }
// WriteTo writes data to w.
WriteTo writes data to w .