From d56966541271d21d40b97580e1c402427e8c58c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 22 Jan 2023 22:01:53 +0000 Subject: [PATCH] Add exception for italics followed by en dash --- custom/org-format.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom/org-format.el b/custom/org-format.el index 5f71c4d..0238648 100644 --- a/custom/org-format.el +++ b/custom/org-format.el @@ -7,6 +7,9 @@ (while (re-search-forward " –" nil t) (replace-match " –")) (goto-char (region-beginning)) + (while (re-search-forward "/ –" nil t) + (replace-match "/ –")) ;; italics won’t work otherwise + (goto-char (region-beginning)) (while (re-search-forward " \\.\\.\\." nil t) (replace-match " …")) (goto-char (region-beginning))