Function: org-element-footnote-reference-parser
org-element-footnote-reference-parser is a byte-compiled function
defined in org-element.el.gz.
Signature
(org-element-footnote-reference-parser)
Documentation
Parse footnote reference at point, if any.
When at a footnote reference, return a new syntax node of
footnote-reference type containing :label, :type, :begin,
:end, :contents-begin, :contents-end and :post-blank as
properties. Otherwise, return nil.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
;;;; Footnote Reference
(defun org-element-footnote-reference-parser ()
"Parse footnote reference at point, if any.
When at a footnote reference, return a new syntax node of
`footnote-reference' type containing `:label', `:type', `:begin',
`:end', `:contents-begin', `:contents-end' and `:post-blank' as
properties. Otherwise, return nil."
(when (looking-at org-footnote-re)
(let ((closing (with-syntax-table org-element--pair-square-table
(ignore-errors (scan-lists (point) 1 0)))))
(when closing
(save-excursion
(let* ((begin (point))
(label (org-element--get-cached-string
(match-string-no-properties 1)))
(inner-begin (match-end 0))
(inner-end (1- closing))
(type (if (match-end 2) 'inline 'standard))
(post-blank (progn (goto-char closing)
(skip-chars-forward " \t")))
(end (point)))
(org-element-create
'footnote-reference
(list :label label
:type type
:begin begin
:end end
:contents-begin (and (eq type 'inline) inner-begin)
:contents-end (and (eq type 'inline) inner-end)
:post-blank post-blank))))))))