diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-12-12 00:38:39 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-12-12 00:38:39 +0100 |
commit | 7d1a6777d08a18e3df481ed2b6654ac220c05f57 (patch) | |
tree | d3249cdd391d8812a31194c6f8deb49ba39350b3 | |
parent | 06c6ba4ac3750032dbbde67fc75c41940f3040c8 (diff) | |
download | org-mode-7d1a6777d08a18e3df481ed2b6654ac220c05f57.tar.gz |
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>
-rw-r--r-- | lisp/ox.el | 2 | ||||
-rw-r--r-- | testing/lisp/test-ox.el | 10 |
2 files changed, 11 insertions, 1 deletions
@@ -2757,7 +2757,7 @@ returned by the function." (when new ;; Splice NEW at BLOB location in parse tree. (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) ;; Return modified parse tree. data) diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el index 31de8f4..136fdfe 100644 --- a/testing/lisp/test-ox.el +++ b/testing/lisp/test-ox.el @@ -778,6 +778,16 @@ Paragraph <2012-03-29 Thu>[2012-03-29 Thu]" (paragraph . (lambda (p c i) c)) (section . (lambda (s c i) c)))) 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. (should (equal "a_b" |