X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-wash.el;h=26a3f881163f8c6e4b50604faea685b54e66bc93;hp=46e182435ea24163aafbbf3b436baf7a963002ad;hb=5ebf5efcb0ed316139f9c44a10ddffc09637f596;hpb=636925b40b20c60961660d14e0356f0970e97546 diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 46e18243..26a3f881 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -214,7 +214,17 @@ Perform four transformations on the message body: ;; text. (goto-char (point-min)) (while (re-search-forward "\\(^>[> ]*\n\\)\\(^$\\|^[^>].*\\)" nil t) - (replace-match "\\2"))) + (replace-match "\\2")) + + ;; Insert a blank line before a citation if there isn't one. + (goto-char (point-min)) + (while (re-search-forward "\\(^[^>]+\\)\n>" nil t) + (replace-match "\\1\n\n>")) + + ;; Insert a blank line after a citation if there isn't one. + (goto-char (point-min)) + (while (re-search-forward "\\(^>.+\\)\n\\([^>]\\)" nil t) + (replace-match "\\1\n\n\\2"))) ;;