Jelajahi Sumber

Match entities before number, so that \sim2 is fontified correctly

* lisp/org.el (org-fontify-entities): Match entities before numbers, as in
`\sim2'.
Carsten Dominik 14 tahun lalu
induk
melakukan
a9689b8750
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -5785,7 +5785,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
     (when org-pretty-entities
       (catch 'match
 	(while (re-search-forward
-		"\\\\\\([a-zA-Z][a-zA-Z0-9]*\\)\\($\\|[^[:alnum:]\n]\\)"
+		"\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)"
 		limit t)
 	  (if (and (not (org-in-indented-comment-line))
 		   (setq ee (org-entity-get (match-string 1)))