diff options
| -rw-r--r-- | ox-jira.el | 16 | ||||
| -rw-r--r-- | ox-jira.org | 24 | ||||
| -rw-r--r-- | test/ox-jira-test.el | 2 | ||||
| -rw-r--r-- | test/ox-jira-test.org | 2 |
4 files changed, 40 insertions, 4 deletions
@@ -79,8 +79,8 @@ (src-block . org-jira-src-block) (statistics-cookie . org-jira-statistics-cookie) (strike-through . org-jira-strike-through) - (subscript . (lambda (&rest args) (org-jira--not-implemented 'subscript))) - (superscript . (lambda (&rest args) (org-jira--not-implemented 'superscript))) + (subscript . org-jira-subscript) + (superscript . org-jira-superscript) (table . org-jira-table) (table-cell . org-jira-table-cell) (table-row . org-jira-table-row) @@ -232,6 +232,18 @@ contextual information." lang code)))) +(defun org-jira-subscript (subscript contents info) + "Transcode SUBSCRIPT from Org to JIRA. +CONTENTS is the text with subscript markup. INFO is a plist holding +contextual information." + (format "~%s~" contents)) + +(defun org-jira-superscript (superscript contents info) + "Transcode SUPERSCRIPT from Org to JIRA. +CONTENTS is the text with superscript markup. INFO is a plist holding +contextual information." + (format "^%s^" contents)) + (defun org-jira-table (table contents info) "Transcode a TABLE element from Org to JIRA. CONTENTS holds the contents of the table. INFO is a plist holding diff --git a/ox-jira.org b/ox-jira.org index ab3c156..e55e8f8 100644 --- a/ox-jira.org +++ b/ox-jira.org @@ -169,8 +169,8 @@ (src-block . org-jira-src-block) (statistics-cookie . org-jira-statistics-cookie) (strike-through . org-jira-strike-through) - (subscript . (lambda (&rest args) (org-jira--not-implemented 'subscript))) - (superscript . (lambda (&rest args) (org-jira--not-implemented 'superscript))) + (subscript . org-jira-subscript) + (superscript . org-jira-superscript) (table . org-jira-table) (table-cell . org-jira-table-cell) (table-row . org-jira-table-row) @@ -441,6 +441,26 @@ code)))) #+END_SRC +*** Subscript + + #+BEGIN_SRC emacs-lisp + (defun org-jira-subscript (subscript contents info) + "Transcode SUBSCRIPT from Org to JIRA. + CONTENTS is the text with subscript markup. INFO is a plist holding + contextual information." + (format "~%s~" contents)) + #+END_SRC + +*** Superscript + + #+BEGIN_SRC emacs-lisp + (defun org-jira-superscript (superscript contents info) + "Transcode SUPERSCRIPT from Org to JIRA. + CONTENTS is the text with superscript markup. INFO is a plist holding + contextual information." + (format "^%s^" contents)) + #+END_SRC + *** Table Org's table editor is one of the many reasons to use Org. It is excellent. diff --git a/test/ox-jira-test.el b/test/ox-jira-test.el index 5aab8da..4b7757e 100644 --- a/test/ox-jira-test.el +++ b/test/ox-jira-test.el @@ -33,6 +33,8 @@ (should (equal "this is *strong* text\n" (org-export-string-as "this is *strong* text" 'jira))) (should (equal "this is _emphasised_ text\n" (org-export-string-as "this is /emphasised/ text" 'jira))) (should (equal "this is +underlined+ text\n" (org-export-string-as "this is _underlined_ text" 'jira))) + (should (equal "this is super^scripted^ text\n" (org-export-string-as "this is super^scripted text" 'jira))) + (should (equal "this is sub~scripted~ text\n" (org-export-string-as "this is sub_scripted text" 'jira))) (should (equal "this is -deleted- text\n" (org-export-string-as "this is +deleted+ text" 'jira))) (should (equal "this is {{inline code}}\n" (org-export-string-as "this is ~inline code~" 'jira))) (should (equal "this is {{verbatim}} text\n" (org-export-string-as "this is =verbatim= text" 'jira)))) diff --git a/test/ox-jira-test.org b/test/ox-jira-test.org index 75272d7..9cb8a6b 100644 --- a/test/ox-jira-test.org +++ b/test/ox-jira-test.org @@ -91,6 +91,8 @@ (should (equal "this is *strong* text\n" (org-export-string-as "this is *strong* text" 'jira))) (should (equal "this is _emphasised_ text\n" (org-export-string-as "this is /emphasised/ text" 'jira))) (should (equal "this is +underlined+ text\n" (org-export-string-as "this is _underlined_ text" 'jira))) + (should (equal "this is super^scripted^ text\n" (org-export-string-as "this is super^scripted text" 'jira))) + (should (equal "this is sub~scripted~ text\n" (org-export-string-as "this is sub_scripted text" 'jira))) (should (equal "this is -deleted- text\n" (org-export-string-as "this is +deleted+ text" 'jira))) (should (equal "this is {{inline code}}\n" (org-export-string-as "this is ~inline code~" 'jira))) (should (equal "this is {{verbatim}} text\n" (org-export-string-as "this is =verbatim= text" 'jira)))) |
