aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/extensions/footnotes.md6
-rw-r--r--markdown/extensions/footnotes.py9
2 files changed, 13 insertions, 2 deletions
diff --git a/docs/extensions/footnotes.md b/docs/extensions/footnotes.md
index c94c2c4..aaff184 100644
--- a/docs/extensions/footnotes.md
+++ b/docs/extensions/footnotes.md
@@ -85,3 +85,9 @@ The following options are provided to configure the output:
* **`BACKLINK_TEXT`**:
The text string that links from the footnote definition back to the position
in the document. Defaults to `↩`.
+
+* **`BACKLINK_TITLE`**:
+ The text string for the `title` HTML attribute of the footnote definition link.
+ `%d` will be replaced by the footnote number. Defaults to `Jump back to
+ footnote %d in the text`
+
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py
index 7edf813..620cf0b 100644
--- a/markdown/extensions/footnotes.py
+++ b/markdown/extensions/footnotes.py
@@ -49,7 +49,12 @@ class FootnoteExtension(Extension):
"BACKLINK_TEXT":
["↩",
"The text string that links from the footnote "
- "to the reader's place."]
+ "to the reader's place."],
+ "BACKLINK_TITLE":
+ ["Jump back to footnote %d in the text",
+ "The text string used for the title HTML attribute "
+ "of the backlink. %d will be replaced by the "
+ "footnote number."]
}
super(FootnoteExtension, self).__init__(*args, **kwargs)
@@ -192,7 +197,7 @@ class FootnoteExtension(Extension):
backlink.set("class", "footnote-backref")
backlink.set(
"title",
- "Jump back to footnote %d in the text" %
+ self.getConfig("BACKLINK_TITLE") %
(self.footnotes.index(id)+1)
)
backlink.text = FN_BACKLINK_TEXT