Forráskód Böngészése

Merge branch 'maint'

Nicolas Goaziou 3 éve
szülő
commit
80bce047ff
1 módosított fájl, 3 hozzáadás és 5 törlés
  1. 3 5
      lisp/ob-tangle.el

+ 3 - 5
lisp/ob-tangle.el

@@ -414,9 +414,8 @@ non-nil, return the full association list to be used by
 	 (src-lang (nth 0 info))
 	 (params (nth 2 info))
 	 (extra (nth 3 info))
-	 (cref-fmt (or (and (string-match "-l \"\\(.+\\)\"" extra)
-			    (match-string 1 extra))
-		       org-coderef-label-format))
+         (coderef (nth 6 info))
+	 (cref-regexp (org-src-coderef-regexp coderef))
 	 (link (let ((l (org-no-properties (org-store-link nil))))
                  (and (string-match org-link-bracket-re l)
                       (match-string 1 l))))
@@ -445,8 +444,7 @@ non-nil, return the full association list to be used by
 					(funcall assignments-cmd params))))))
 	      (when (string-match "-r" extra)
 		(goto-char (point-min))
-		(while (re-search-forward
-			(replace-regexp-in-string "%s" ".+" cref-fmt) nil t)
+		(while (re-search-forward cref-regexp nil t)
 		  (replace-match "")))
 	      (run-hooks 'org-babel-tangle-body-hook)
 	      (buffer-string))))