Get rid of html head

master
trémeur 3 years ago
parent bd7155ba59
commit 499d4a4dff

@ -22,12 +22,11 @@
(setq newname (concat (file-name-base) ".html")) (setq newname (concat (file-name-base) ".html"))
(find-file-noselect newname) (find-file-noselect newname)
(with-current-buffer newname (with-current-buffer newname
(goto-line 1) (goto-char (point-min))
(delete-region (line-beginning-position) (line-end-position)) (setq delpoint (search-forward "</head>\n"))
(goto-line 2) (delete-region (point-min) delpoint)
(delete-region (line-beginning-position) (line-end-position)) (while (re-search-forward "<\\/html>" nil t)
(goto-line 3) (replace-match ""))
(delete-region (line-beginning-position) (line-end-position))
(write-file newname))) (write-file newname)))
(defun dwdraft () (defun dwdraft ()

Loading…
Cancel
Save