Hi,

Samuel Wales wrote:
So I guess I'd like to know if:

   1) anybody has a /hook in the exporter/ to unfill paragraphs, or

This is what I've come up with for posting comments on WordPress blogs, without <p> tags and linebreaks. It can probably be written more elegantly, but it does what I need. Haven't tried Blogger but possibly it works for you as well.

(defun my-org-postprocess-blog-post ()
    "Adapt exported HTML to blogs that get confused by <p> and
newlines."
  (let ((fill-column (point-max))) ; h/t Chris Lowry
    ;; p tags
    (goto-char (point-min))
    (while (re-search-forward "</?p>" nil t)
      (replace-match ""))
    ;; unfill
    (fill-region start end nil) ; with fill-column set really huge
    ;; delete superfluous blank lines (is there a better way?)
    (goto-char (point-min))
    (while (re-search-forward "\n\n+" nil t)
      (previous-line)
      (delete-blank-lines))))

(org-add-hook 'org-export-html-final-hook 'my-org-postprocess-blog-post)

   2) anybody has a way for the HTML to instruct the browser to /ignore
newlines/

I don't think that's a viable option across platforms.

Yours,
Christian


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to