code: function appendCode() {
      if (state === "code") {
        state = "text";
        if (!isWhitespace(codeBuffer)) {
          content += codeOpen + codeBuffer.replace(/^(?:\s*\n)+/, "").replace(/[\s\n]*$/, "") + codeClose;
        }
        codeBuffer = "";
      }
    }
docs: buffer for code output