code: func (w *Writer) Write(p []byte) (int, error) {
  	nWritten := 0
  	ss := strings.Split(string(p), "\n")
  	for i, s := range ss {
  		// TODO: strip out pre-existing ANSI codes and expand tabs. Would be
  		// great to expand tabs in a context aware way (line linux expand
  		// command).
  
  		n, err := w.writeRaw(s)
  		if err != nil {
  			return nWritten, err
  		}
  		nWritten += n
  
  		// Increment the origin (line count) for each newline.  There is a
  		// newline for every item in this array except the last one.
  		if i != len(ss)-1 {
  			n, err := w.Output.Write([]byte("\n"))
  			if err != nil {
  				return nWritten, err
  			}
  			nWritten += n
  			w.origin++
  			w.lineIdx = 0
  		}
  	}
  	return nWritten, nil
  }
docs: // Write will write a byte slice to the Writer