aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Brautaset <stig@brautaset.org>2017-06-07 23:01:56 +0100
committerStig Brautaset <stig@brautaset.org>2017-10-01 10:16:18 +0100
commit23565783ca66e2aafc2aa03796e09dde4ae11c1a (patch)
tree88793024d5dec5551b67aefdce12594eb533066f
parent8ef460444de3a1a54a2b60567026c36e48c45ce8 (diff)
Fix footnote test
-rw-r--r--ox-jira.el6
-rw-r--r--test/ox-jira-test.el7
2 files changed, 7 insertions, 6 deletions
diff --git a/ox-jira.el b/ox-jira.el
index 514eb49..0379456 100644
--- a/ox-jira.el
+++ b/ox-jira.el
@@ -212,8 +212,8 @@ information."
CONTENTS is nil. INFO is a plist holding contextual
information."
(let* ((anchor (ox-jira--footnote-anchor footnote-reference))
- (ref (ox-jira--footnote-ref anchor)))
- (format "{anchor:back%s}[^%s^|#%s]"
+ (ref (ox-jira--footnote-ref anchor)))
+ (format "{anchor:fnr%s}[^%s^|#fn%s]"
anchor ref anchor)))
(defun ox-jira-footnote-definition (footnote-definition contents info)
@@ -222,7 +222,7 @@ CONTENTS is nil. INFO is a plist holding contextual
information."
(let* ((anchor (ox-jira--footnote-anchor footnote-definition))
(ref (ox-jira--footnote-ref anchor)))
- (format "{anchor:%s}[^%s^|#back%s] %s"
+ (format "{anchor:fn%s}[^%s^|#fnr%s] %s"
anchor ref anchor contents)))
;; Headlines are a little bit more complex. I'm not even attempting to support
diff --git a/test/ox-jira-test.el b/test/ox-jira-test.el
index 8ac4a7b..688ed4a 100644
--- a/test/ox-jira-test.el
+++ b/test/ox-jira-test.el
@@ -353,11 +353,12 @@ formatted
(equal "----\n" (to-jira "-------\n"))))
(ert-deftest ox-jira-test/footnotes ()
- (should (equal "fi fo{anchor:backfn1}[^1^|#fn1]. Another one{anchor:backfn2}[^2^|#fn2].
+ (should (equal "fi fo{anchor:fnr1}[^1^|#fn1]. Another one{anchor:fnr2}[^2^|#fn2].
h1. Footnotes
-{anchor:fn1}[^1^|#backfn1] fa fum.
-{anchor:fn2}[^2^|#backfn2] fut fut.
+{anchor:fn1}[^1^|#fnr1] fa fum.
+
+{anchor:fn2}[^2^|#fnr2] fut fut.
" (to-jira "fi fo[fn:1]. Another one[fn:2].
* Footnotes