aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ox-jira.el4
-rw-r--r--ox-jira.org4
-rw-r--r--test/ox-jira-test.el10
3 files changed, 17 insertions, 1 deletions
diff --git a/ox-jira.el b/ox-jira.el
index 71ab613..f49c281 100644
--- a/ox-jira.el
+++ b/ox-jira.el
@@ -284,6 +284,10 @@ INFO is a plist holding contextual information. See
(concat type ":" raw-path))
((string= type "file")
(org-export-file-uri raw-path))
+ ((string= type "custom-id")
+ (if desc (concat "#" desc) (concat "#" raw-path)))
+ ((string-prefix-p "*" raw-path)
+ (concat "#" (seq-subseq raw-path 1)))
(t raw-path))))
(cond
;; Link with description
diff --git a/ox-jira.org b/ox-jira.org
index 8196fe5..8004485 100644
--- a/ox-jira.org
+++ b/ox-jira.org
@@ -492,6 +492,10 @@ but we must make a token effort. A lot of this code is cribbed from
(concat type ":" raw-path))
((string= type "file")
(org-export-file-uri raw-path))
+ ((string= type "custom-id")
+ (if desc (concat "#" desc) (concat "#" raw-path)))
+ ((string-prefix-p "*" raw-path)
+ (concat "#" (seq-subseq raw-path 1)))
(t raw-path))))
(cond
;; Link with description
diff --git a/test/ox-jira-test.el b/test/ox-jira-test.el
index 688ed4a..293095d 100644
--- a/test/ox-jira-test.el
+++ b/test/ox-jira-test.el
@@ -123,7 +123,15 @@ h1. {color:red}{{TODO}}{color} This is another headline {color:blue}{{:FOO:BAR:}
(should (equal "fi [http://jira.atlassian.com] fo\n"
(to-jira "fi [[http://jira.atlassian.com]] fo")))
(should (equal "fi [Jira|http://jira.atlassian.com] fo\n"
- (to-jira "fi [[http://jira.atlassian.com][Jira]] fo"))))
+ (to-jira "fi [[http://jira.atlassian.com][Jira]] fo")))
+ (should (equal "see [#Heading Name] for details\n"
+ (to-jira "see [[*Heading Name]] for details")))
+ (should (equal "see [This Thing|#Heading Name] for details\n"
+ (to-jira "see [[*Heading Name][This Thing]] for details")))
+ (should (equal "see [#Heading Name] for details\n"
+ (to-jira "see [[#Heading Name]] for details")))
+ (should (equal "see [This Thing|#This Thing] for details\n"
+ (to-jira "see [[#Heading Name][This Thing]] for details"))))
;; Check that text in paragraphs does not have hard newlines.
;;