diff options
| author | Stig Brautaset <stig@brautaset.org> | 2016-04-14 09:17:32 +0100 |
|---|---|---|
| committer | Stig Brautaset <stig@brautaset.org> | 2016-04-14 09:17:32 +0100 |
| commit | e1032e2ec8bd70f42e33fa320f2b8b96f587cf23 (patch) | |
| tree | 268b8e0b8173dfb918fad0127b0d044995ec84ed | |
| parent | 33b56005554ba36663f3cb9fde8e0d263d8cd280 (diff) | |
| parent | 30e02685ef543192a03fbdbdb6add52a71f0081f (diff) | |
Merge pull request #16 from Munsen/suppport-hrule
Support transcode horizontal-rule
| -rw-r--r-- | ox-jira.el | 6 | ||||
| -rw-r--r-- | ox-jira.org | 10 | ||||
| -rw-r--r-- | test/ox-jira-test.org | 12 |
3 files changed, 26 insertions, 2 deletions
@@ -58,7 +58,7 @@ (footnote-definition . ox-jira-footnote-definition) (footnote-reference . ox-jira-footnote-reference) (headline . ox-jira-headline) - (horizontal-rule . (lambda (&rest args) (ox-jira--not-implemented 'horizontal-rule))) + (horizontal-rule . ox-jira-horizontal-rule) (inline-babel-call . (lambda (&rest args) (ox-jira--not-implemented 'inline-babel-call))) (inline-src-block . (lambda (&rest args) (ox-jira--not-implemented 'inline-src-block))) (inlinetask . (lambda (&rest args) (ox-jira--not-implemented 'inlinetask))) @@ -172,6 +172,10 @@ the plist used as a communication channel." (format "h%d. %s\n" level title) contents))) +(defun ox-jira-horizontal-rule (horizontal-rule contents info) + "Transcode a HORIZONTAL-RULE element from Org to JIRA." + "----\n") + (defun ox-jira-italic (italic contents info) "Transcode ITALIC from Org to JIRA. CONTENTS is the text with italic markup. INFO is a plist holding diff --git a/ox-jira.org b/ox-jira.org index b85a198..3653369 100644 --- a/ox-jira.org +++ b/ox-jira.org @@ -133,7 +133,7 @@ (footnote-definition . ox-jira-footnote-definition) (footnote-reference . ox-jira-footnote-reference) (headline . ox-jira-headline) - (horizontal-rule . (lambda (&rest args) (ox-jira--not-implemented 'horizontal-rule))) + (horizontal-rule . ox-jira-horizontal-rule) (inline-babel-call . (lambda (&rest args) (ox-jira--not-implemented 'inline-babel-call))) (inline-src-block . (lambda (&rest args) (ox-jira--not-implemented 'inline-src-block))) (inlinetask . (lambda (&rest args) (ox-jira--not-implemented 'inlinetask))) @@ -316,6 +316,14 @@ contents))) #+END_SRC +*** Horizontal Rule + + #+BEGIN_SRC emacs-lisp + (defun ox-jira-horizontal-rule (horizontal-rule contents info) + "Transcode a HORIZONTAL-RULE element from Org to JIRA." + "----\n") + #+END_SRC + *** Italic #+BEGIN_SRC emacs-lisp diff --git a/test/ox-jira-test.org b/test/ox-jira-test.org index 08f16a5..912508a 100644 --- a/test/ox-jira-test.org +++ b/test/ox-jira-test.org @@ -352,6 +352,18 @@ " 'jira)))) #+END_SRC +** Horizontal Rule + + Horizontal rule is expressed at least five hyphens with newline in Org + + #+BEGIN_SRC emacs-lisp + (ert-deftest ox-jira-test/horizontal-rule () + (should + (equal "----\n" (org-export-string-as "-----\n" 'jira))) + (should + (equal "----\n" (org-export-string-as "-------\n" 'jira)))) + #+END_SRC + ** Footnotes #+BEGIN_SRC emacs-lisp |
