diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-11-18 00:19:35 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-11-25 15:42:10 +0100 |
commit | ed06b159c328d6b7781527725a49b8833ed18bfc (patch) | |
tree | 1716f17fe087d23cc44e47eb1dba614a6d76aecc | |
parent | 1b1966a1441f03a70069e19f49c926e52d15d604 (diff) | |
download | org-mode-ed06b159c328d6b7781527725a49b8833ed18bfc.tar.gz |
Small fix to emphasis fontification
* lisp/org.el (org-do-emphasis-faces): Do not span over paragraph
separators.
Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00202.html>
-rw-r--r-- | lisp/org.el | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/org.el b/lisp/org.el index 571a311..c2e5301 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5753,20 +5753,16 @@ This should be called after the variable `org-link-parameters' has changed." (when (save-excursion (goto-char (match-beginning 0)) (and - ;; Do not match headline stars. Do not consider - ;; stars of a headline as closing marker for bold - ;; markup either. - (not (and (equal marker "*") - (save-excursion - (forward-char) - (skip-chars-backward "*") - (looking-at-p org-outline-regexp-bol)))) ;; Do not match table hlines. (not (and (equal marker "+") (org-match-line - "^[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$"))) + "[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$"))) + ;; Match full emphasis markup regexp. (looking-at (if verbatim? org-verbatim-re org-emph-re)) - ;; At a table row, do not cross cell boundaries. + ;; Do not span over paragraph boundaries. + (not (string-match-p org-element-paragraph-separate + (match-string 2))) + ;; Do not span over cells in table rows. (not (and (save-match-data (org-match-line "[ \t]*|")) (string-match-p "|" (match-string 4)))))) (pcase-let ((`(,_ ,face ,_) (assoc marker org-emphasis-alist))) |