浏览代码

Merge branch 'maint'

Nicolas Goaziou 9 年之前
父节点
当前提交
ce748a7ed5
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      lisp/ox-ascii.el

+ 7 - 1
lisp/ox-ascii.el

@@ -886,7 +886,13 @@ is a plist used as a communication channel."
 			  (gethash link (plist-get info :exported-data)))
 			 (not (member footprint seen)))
 		(push footprint seen) link)))))
-    (org-element-map element 'link unique-link-p info nil nil t)))
+    (org-element-map (if (eq (org-element-type element) 'section)
+			 element
+		       ;; In a headline, only retrieve links in title
+		       ;; and relative section, not in children.
+		       (list (org-element-property :title element)
+			     (car (org-element-contents element))))
+	'link unique-link-p info nil 'headline t)))
 
 (defun org-ascii--describe-links (links width info)
   "Return a string describing a list of links.