Browse Source

Yet another tweak to fontification

* lisp/org.el (org-do-emphasis-faces): Handle properly asterisks at
  the beginning of line.
Nicolas Goaziou 7 years ago
parent
commit
14620fdf0c
1 changed files with 8 additions and 0 deletions
  1. 8 0
      lisp/org.el

+ 8 - 0
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.