summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-12-02 23:21:36 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-12-02 23:21:36 +0100
commit14620fdf0c830f2dafe28438569ae364a1b0b621 (patch)
treef3960b0e4fe9713b984dbf922cb9e9a4f0f37696
parent8bd9839952baa42b1c8aa4150ec6420b009f9f5d (diff)
downloadorg-mode-14620fdf0c830f2dafe28438569ae364a1b0b621.tar.gz
Yet another tweak to fontification
* lisp/org.el (org-do-emphasis-faces): Handle properly asterisks at the beginning of line.
-rw-r--r--lisp/org.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 7a4060b..fbdcca0 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5758,6 +5758,14 @@ This should be called after the variable `org-link-parameters' has changed."
(not (and (equal marker "+")
(org-match-line
"[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$")))
+ ;; 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))))
;; Match full emphasis markup regexp.
(looking-at (if verbatim? org-verbatim-re org-emph-re))
;; Do not span over paragraph boundaries.