tweak(org): allow sub/superscripts after emphasis

This commit is contained in:
Kiana Sheibani 2025-02-19 17:42:14 -05:00
parent e4f0ee27e4
commit 34225c8d9f
Signed by: toki
GPG key ID: 6CB106C25E86A9F7

View file

@ -3105,11 +3105,11 @@ Since we've disabled =+pretty=, we need to add the packages we do want from it,
*** Emphasis
When marking text for =*emphasis*=, Org mode normally only allows emphasized sections to span 2 lines. This strikes me as needlessly limited, so let's bump up that number to 20 lines.
When marking text for =*emphasis*=, Org mode normally only allows emphasized sections to span 2 lines. This strikes me as needlessly limited, so let's bump up that number to 20 lines. We can also use this variable to modify Org's parser to support sub/superscripts immediately after emphasized text, which is useful.
#+begin_src emacs-lisp
(after! org
(setf (nth 4 org-emphasis-regexp-components) 20))
(setq org-emphasis-regexp-components
'("-[:space:]('\"{" "-[:space:].,:!?;'\"_^)}\\[" "[:space:]" "." 20))
#+end_src
*** Popups