diff --git a/custom/dwpost.el b/custom/dwpost.el index fb67b69..2e4de99 100644 --- a/custom/dwpost.el +++ b/custom/dwpost.el @@ -23,10 +23,11 @@ (find-file-noselect newname) (with-current-buffer newname (goto-char (point-min)) - (setq delpoint (search-forward "\n")) - (delete-region (point-min) delpoint) - (while (re-search-forward "<\\/html>" nil t) - (replace-match "")) + (setq delpoint-one (search-forward "\n")) + (delete-region (point-min) delpoint-one) + (goto-char (point-max)) + (setq delpoint-two (search-backward "")) + (delete-region delpoint-two (point-max)) (write-file newname))) (defun dwdraft ()