浏览代码

org-element: Update entities regexp

* contrib/lisp/org-element.el (org-element-entity-parser, org-element-latex-or-entity-successor):
Update entities regexp.
Nicolas Goaziou 13 年之前
父节点
当前提交
8d96bbc5c3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      contrib/lisp/org-element.el

+ 2 - 2
contrib/lisp/org-element.el

@@ -1820,7 +1820,7 @@ keywords.
 
 
 Assume point is at the beginning of the entity."
 Assume point is at the beginning of the entity."
   (save-excursion
   (save-excursion
-    (looking-at "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]]\\)")
+    (looking-at "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]]\\)")
     (let* ((value (org-entity-get (match-string 1)))
     (let* ((value (org-entity-get (match-string 1)))
 	   (begin (match-beginning 0))
 	   (begin (match-beginning 0))
 	   (bracketsp (string= (match-string 2) "{}"))
 	   (bracketsp (string= (match-string 2) "{}"))
@@ -1859,7 +1859,7 @@ Return value is a cons cell whose CAR is `entity' or
     (let ((matchers (plist-get org-format-latex-options :matchers))
     (let ((matchers (plist-get org-format-latex-options :matchers))
 	  ;; ENTITY-RE matches both LaTeX commands and Org entities.
 	  ;; ENTITY-RE matches both LaTeX commands and Org entities.
 	  (entity-re
 	  (entity-re
-	   "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|[^[:alpha:]\n]\\)"))
+	   "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]]\\)"))
       (when (re-search-forward
       (when (re-search-forward
 	     (concat (mapconcat (lambda (e) (nth 1 (assoc e org-latex-regexps)))
 	     (concat (mapconcat (lambda (e) (nth 1 (assoc e org-latex-regexps)))
 				matchers "\\|")
 				matchers "\\|")