feat(org): Hide spaces between CJK and markup characters

This commit is contained in:
User
2026-06-30 22:11:14 +08:00
parent 97d0a4a3e4
commit a1a1797035

View File

@@ -12,6 +12,13 @@
(org-mode . electric-pair-local-mode)
:config
(defvar org-hide-space-keywords
'(("\\cc\\( \\)[*/_=~+]\\cc.*?[*/_=~+]"
(0 (prog1 () (add-text-properties (match-beginning 1) (match-end 1) '(invisible t)))))
("[*/_=~+].*?\\cc[*/_=~+]\\( \\)\\cc"
(0 (prog1 () (add-text-properties (match-beginning 1) (match-end 1) '(invisible t)))))))
(font-lock-add-keywords 'org-mode org-hide-space-keywords 'append)
(if *is-windows*
(add-hook 'org-mode-hook 'font-lock-update))