forked from mirrors/org-mode
element: Small speed-up in object parsing
* lisp/org-element.el (org-element--object-lex): Branch earlier for footnote references.
This commit is contained in:
parent
8173884a13
commit
94c2ef7d09
|
@ -4497,15 +4497,18 @@ to an appropriate container (e.g., a paragraph)."
|
|||
(and (memq 'latex-fragment restriction)
|
||||
(org-element-latex-fragment-parser)))))
|
||||
(?\[
|
||||
(if (eq (aref result 1) ?\[)
|
||||
(and (memq 'link restriction)
|
||||
(pcase (aref result 1)
|
||||
((and ?\[
|
||||
(guard (memq 'link restriction)))
|
||||
(org-element-link-parser))
|
||||
(or (and (memq 'footnote-reference restriction)
|
||||
((and ?f
|
||||
(guard (memq 'footnote-reference restriction)))
|
||||
(org-element-footnote-reference-parser))
|
||||
(and (memq 'timestamp restriction)
|
||||
(_
|
||||
(or (and (memq 'timestamp restriction)
|
||||
(org-element-timestamp-parser))
|
||||
(and (memq 'statistics-cookie restriction)
|
||||
(org-element-statistics-cookie-parser)))))
|
||||
(org-element-statistics-cookie-parser))))))
|
||||
;; This is probably a plain link.
|
||||
(_ (and (memq 'link restriction)
|
||||
(org-element-link-parser)))))))
|
||||
|
|
Loading…
Reference in a new issue