Pārlūkot izejas kodu

org-footnote: Don't store text-properties of footnote definitions

* lisp/org-footnote.el (org-footnote-at-reference-p,
  org-footnote-at-definition-p): Don't store text-properties of footnote definitions.
Nicolas Goaziou 13 gadi atpakaļ
vecāks
revīzija
f2b3fe7318
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      lisp/org-footnote.el

+ 4 - 2
lisp/org-footnote.el

@@ -240,7 +240,8 @@ positions, and the definition, when inlined."
 	(list label beg end
 	(list label beg end
 	      ;; Definition: ensure this is an inline footnote first.
 	      ;; Definition: ensure this is an inline footnote first.
 	      (and (or (not label) (match-string 1))
 	      (and (or (not label) (match-string 1))
-		   (org-trim (buffer-substring (match-end 0) (1- end)))))))))
+		   (org-trim (buffer-substring-no-properties
+			      (match-end 0) (1- end)))))))))
 
 
 (defun org-footnote-at-definition-p ()
 (defun org-footnote-at-definition-p ()
   "Is the cursor at a footnote definition?
   "Is the cursor at a footnote definition?
@@ -275,7 +276,8 @@ label, start, end and definition of the footnote otherwise."
 			      bound 'move)
 			      bound 'move)
 			     (progn (skip-chars-forward " \t\n") (point-at-bol)))
 			     (progn (skip-chars-forward " \t\n") (point-at-bol)))
 			(point))))
 			(point))))
-		(org-trim (buffer-substring (match-end 0) (point)))))))))
+		(org-trim (buffer-substring-no-properties
+			   (match-end 0) (point)))))))))
 
 
 (defun org-footnote-get-next-reference (&optional label backward limit)
 (defun org-footnote-get-next-reference (&optional label backward limit)
   "Return complete reference of the next footnote.
   "Return complete reference of the next footnote.