mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-30 02:30:03 +00:00
Merge branch 'maint'
This commit is contained in:
commit
0ace32b045
12
lisp/ox.el
12
lisp/ox.el
|
@ -4031,11 +4031,15 @@ used as a communication channel."
|
||||||
(memq (org-element-type (org-export-get-previous-element blob info))
|
(memq (org-element-type (org-export-get-previous-element blob info))
|
||||||
'(nil section)))
|
'(nil section)))
|
||||||
|
|
||||||
(defun org-export-last-sibling-p (blob info)
|
(defun org-export-last-sibling-p (datum info)
|
||||||
"Non-nil when BLOB is the last sibling in its parent.
|
"Non-nil when DATUM is the last sibling in its parent.
|
||||||
BLOB is an element or an object. INFO is a plist used as
|
DATUM is an element or an object. INFO is a plist used as
|
||||||
a communication channel."
|
a communication channel."
|
||||||
(not (org-export-get-next-element blob info)))
|
(let ((next (org-export-get-next-element datum info)))
|
||||||
|
(or (not next)
|
||||||
|
(and (eq 'headline (org-element-type datum))
|
||||||
|
(> (org-element-property :level datum)
|
||||||
|
(org-element-property :level next))))))
|
||||||
|
|
||||||
|
|
||||||
;;;; For Keywords
|
;;;; For Keywords
|
||||||
|
|
|
@ -2677,7 +2677,13 @@ Para2"
|
||||||
(org-test-with-parsed-data "* Headline\n* Headline 2 :ignore:"
|
(org-test-with-parsed-data "* Headline\n* Headline 2 :ignore:"
|
||||||
(org-element-map tree 'headline
|
(org-element-map tree 'headline
|
||||||
(lambda (h) (if (org-export-last-sibling-p h info) 'yes 'no))
|
(lambda (h) (if (org-export-last-sibling-p h info) 'yes 'no))
|
||||||
info))))))
|
info)))))
|
||||||
|
;; Handle gracefully discontinuous headings.
|
||||||
|
(should
|
||||||
|
(equal '(yes yes)
|
||||||
|
(org-test-with-parsed-data "** S\n* H"
|
||||||
|
(org-element-map tree 'headline
|
||||||
|
(lambda (h) (if (org-export-last-sibling-p h info) 'yes 'no)))))))
|
||||||
|
|
||||||
(ert-deftest test-org-export/handle-inlinetasks ()
|
(ert-deftest test-org-export/handle-inlinetasks ()
|
||||||
"Test inlinetask export."
|
"Test inlinetask export."
|
||||||
|
|
Loading…
Reference in a new issue