aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJae Mun Cha <amunsen@gmail.com>2016-04-13 23:43:56 +0900
committerBrian Cha <brian.cha@udptechnology.com>2016-04-14 17:03:11 +0900
commit30e02685ef543192a03fbdbdb6add52a71f0081f (patch)
tree268b8e0b8173dfb918fad0127b0d044995ec84ed
parent33b56005554ba36663f3cb9fde8e0d263d8cd280 (diff)
Support transcode horizontal-rule
-rw-r--r--ox-jira.el6
-rw-r--r--ox-jira.org10
-rw-r--r--test/ox-jira-test.org12
3 files changed, 26 insertions, 2 deletions
diff --git a/ox-jira.el b/ox-jira.el
index 68410bb..6ad0a16 100644
--- a/ox-jira.el
+++ b/ox-jira.el
@@ -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