aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Huang <rymndhng@gmail.com>2017-03-20 20:02:55 -0700
committerRaymond Huang <rymndhng@gmail.com>2017-03-20 20:03:28 -0700
commit7f6e6a87b542eedfe270a196a76ebaed55634e45 (patch)
tree0de8437d9b28e66a806dfb581d481cfe85e4552e
parentb65cd8c828ce150cedcb34c2bf87bb61636702ed (diff)
Use caption instead of name
-rw-r--r--ox-jira.el2
-rw-r--r--test/ox-jira-test.el6
2 files changed, 4 insertions, 4 deletions
diff --git a/ox-jira.el b/ox-jira.el
index a59a192..f163cf9 100644
--- a/ox-jira.el
+++ b/ox-jira.el
@@ -405,7 +405,7 @@ the plist used as a communication channel."
CONTENTS holds the contents of the src-block. INFO is a plist holding
contextual information."
(when (org-string-nw-p (org-element-property :value src-block))
- (let* ((title (or (org-element-property :name src-block) ""))
+ (let* ((title (apply #'concat (org-export-get-caption src-block)))
(lang (org-element-property :language src-block))
(lang (if (member lang '("actionscript" "html" "java" "javascript" "sql" "xhtml" "xml")) lang "none"))
(code (org-export-format-code-default src-block info))
diff --git a/test/ox-jira-test.el b/test/ox-jira-test.el
index 9b47cef..90716d5 100644
--- a/test/ox-jira-test.el
+++ b/test/ox-jira-test.el
@@ -247,7 +247,7 @@ END;
SELECT NOW();
END;
{code}
-" (to-jira "#+NAME: Hello
+" (to-jira "#+CAPTION: Hello
#+begin_src sql
BEGIN;
SELECT NOW();
@@ -255,12 +255,12 @@ END;
#+end_src
")))
- (should (equal "{code:title=Hello|language=sql|collapse=true}BEGIN;
+ (should (equal "{code:title=Hello World|language=sql|collapse=true}BEGIN;
SELECT NOW();
SELECT NOW();
END;
{code}
-" (to-jira "#+NAME: Hello
+" (to-jira "#+CAPTION: Hello World
#+begin_src sql
BEGIN;
SELECT NOW();