forked from mirrors/org-mode
ox: Fix uninterpreted subscript
* lisp/ox.el (org-export--remove-uninterpreted-data-1): Fix un-interpreted subscript containing another object. * testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test. Reported-by: Yasushi SHOJI <yashi@atmark-techno.com> <http://permalink.gmane.org/gmane.emacs.orgmode/103553>
This commit is contained in:
parent
06c6ba4ac3
commit
7d1a6777d0
|
@ -2757,7 +2757,7 @@ returned by the function."
|
||||||
(when new
|
(when new
|
||||||
;; Splice NEW at BLOB location in parse tree.
|
;; Splice NEW at BLOB location in parse tree.
|
||||||
(dolist (e new (org-element-extract-element blob))
|
(dolist (e new (org-element-extract-element blob))
|
||||||
(unless (string= e "") (org-element-insert-before e blob))))))
|
(unless (equal e "") (org-element-insert-before e blob))))))
|
||||||
info nil nil t)
|
info nil nil t)
|
||||||
;; Return modified parse tree.
|
;; Return modified parse tree.
|
||||||
data)
|
data)
|
||||||
|
|
|
@ -778,6 +778,16 @@ Paragraph <2012-03-29 Thu>[2012-03-29 Thu]"
|
||||||
(paragraph . (lambda (p c i) c))
|
(paragraph . (lambda (p c i) c))
|
||||||
(section . (lambda (s c i) c))))
|
(section . (lambda (s c i) c))))
|
||||||
nil nil nil '(:with-sub-superscript {})))))
|
nil nil nil '(:with-sub-superscript {})))))
|
||||||
|
(should
|
||||||
|
(equal "a_entity\n"
|
||||||
|
(org-test-with-temp-text "a_\\alpha"
|
||||||
|
(org-export-as
|
||||||
|
(org-export-create-backend
|
||||||
|
:transcoders '((entity . (lambda (e c i) "entity"))
|
||||||
|
(subscript . (lambda (s c i) "dummy"))
|
||||||
|
(paragraph . (lambda (p c i) c))
|
||||||
|
(section . (lambda (s c i) c))))
|
||||||
|
nil nil nil '(:with-sub-superscript nil)))))
|
||||||
;; Also handle uninterpreted objects in title.
|
;; Also handle uninterpreted objects in title.
|
||||||
(should
|
(should
|
||||||
(equal "a_b"
|
(equal "a_b"
|
||||||
|
|
Loading…
Reference in a new issue