]> Untitled Git - lemmy-ui.git/commitdiff
Add markdown footnotes. Fixes #561 (#562)
authorDessalines <dessalines@users.noreply.github.com>
Wed, 2 Feb 2022 14:53:09 +0000 (09:53 -0500)
committerGitHub <noreply@github.com>
Wed, 2 Feb 2022 14:53:09 +0000 (09:53 -0500)
package.json
src/shared/utils.ts
yarn.lock

index a57619f74b7d18de56bc90d5f6381cd74307d3d3..4a20581370e4ca731ccd566c4367abc8a8115506 100644 (file)
@@ -36,6 +36,7 @@
     "jwt-decode": "^3.1.2",
     "markdown-it": "^12.1.0",
     "markdown-it-container": "^3.0.0",
+    "markdown-it-footnote": "^3.0.3",
     "markdown-it-html5-embed": "^1.0.0",
     "markdown-it-sub": "^1.0.0",
     "markdown-it-sup": "^1.0.0",
index 091e85ade0733be562e5ef97a220ea166882f7c2..8c29e4fabde453a95e08d2a05bf4b0c7cc5261ad 100644 (file)
@@ -30,6 +30,7 @@ import {
 } from "lemmy-js-client";
 import markdown_it from "markdown-it";
 import markdown_it_container from "markdown-it-container";
+import markdown_it_footnote from "markdown-it-footnote";
 import markdown_it_html5_embed from "markdown-it-html5-embed";
 import markdown_it_sub from "markdown-it-sub";
 import markdown_it_sup from "markdown-it-sup";
@@ -225,6 +226,7 @@ export const md = new markdown_it({
 })
   .use(markdown_it_sub)
   .use(markdown_it_sup)
+  .use(markdown_it_footnote)
   .use(markdown_it_html5_embed, {
     html5embed: {
       useImageSyntax: true, // Enables video/audio embed with ![]() syntax (default)
index 0e3851b1c5bdae60842a534275067ff7f1d30d08..1e7fd8d034ed545b5068b1dc9a694fcd6f693ce1 100644 (file)
--- a/yarn.lock
+++ b/yarn.lock
@@ -4967,6 +4967,11 @@ markdown-it-container@^3.0.0:
   resolved "https://registry.yarnpkg.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz#1d19b06040a020f9a827577bb7dbf67aa5de9a5b"
   integrity sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==
 
+markdown-it-footnote@^3.0.3:
+  version "3.0.3"
+  resolved "https://registry.yarnpkg.com/markdown-it-footnote/-/markdown-it-footnote-3.0.3.tgz#e0e4c0d67390a4c5f0c75f73be605c7c190ca4d8"
+  integrity sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==
+
 markdown-it-html5-embed@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/markdown-it-html5-embed/-/markdown-it-html5-embed-1.0.0.tgz#f36bedca1eb12ce4df2d53b5ec72f62ba5e094b3"