Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Claus <thorstenclaus@web.de>2021-07-31 09:56:39 +0300
committerBenjamin Neff <benjamin@coding4coffee.ch>2021-09-18 20:19:02 +0300
commit122e12a0689856f0da227603d0bfe04bb5a814a3 (patch)
tree366b09e631a259be9f351f79fb694ea7c13cea84 /app/assets
parent28f03f0a1156fe534cd77a4e99eb2c30fb147b31 (diff)
#7960 Add support for Markdown footnote syntax
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/app/helpers/text_formatter.js3
-rw-r--r--app/assets/javascripts/main.js1
2 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/app/helpers/text_formatter.js b/app/assets/javascripts/app/helpers/text_formatter.js
index 753590664..c9a302fe9 100644
--- a/app/assets/javascripts/app/helpers/text_formatter.js
+++ b/app/assets/javascripts/app/helpers/text_formatter.js
@@ -16,6 +16,9 @@
typographer: true
});
+ var footnote = window.markdownitFootnote;
+ md.use(footnote);
+
var inlinePlugin = window.markdownitForInline;
md.use(inlinePlugin, "utf8_symbols", "text", function (tokens, idx) {
tokens[idx].content = tokens[idx].content.replace(/<->/g, "↔")
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index e359ad7c2..a1a65d610 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -23,6 +23,7 @@
//= require markdown-it
//= require markdown-it-diaspora-mention
//= require markdown-it-for-inline
+//= require markdown-it-footnote
//= require markdown-it-hashtag
//= require markdown-it-sanitizer
//= require markdown-it-sub