+(defun elpher-gemini-insert-text (text-line)
+ "Insert a plain non-preformatted TEXT-LINE into a text/gemini document.
+This function uses Emacs' auto-fill to wrap text sensibly to a maximum
+width defined by elpher-gemini-max-fill-width."
+ (insert (elpher-process-text-for-display text-line))
+ (let* ((prefix-end-idx (string-match "^[ \t]*\\(\*+[ \t]\\)?" text-line))
+ (fill-prefix (replace-regexp-in-string "\*" " " (match-string 0 text-line))))
+ (newline)))
+