fix: update imports for updated markdown-it-plugins
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
16
package.json
16
package.json
@@ -56,18 +56,18 @@
|
|||||||
"lz-string": "git+https://github.com/hackmdio/lz-string.git#commit=6edfccb79cd8c210f03fd3bf18e41ca144fbeefb",
|
"lz-string": "git+https://github.com/hackmdio/lz-string.git#commit=6edfccb79cd8c210f03fd3bf18e41ca144fbeefb",
|
||||||
"mariadb": "3.4.5",
|
"mariadb": "3.4.5",
|
||||||
"markdown-it": "14.1.1",
|
"markdown-it": "14.1.1",
|
||||||
"markdown-it-abbr": "1.0.4",
|
"markdown-it-abbr": "2.0.0",
|
||||||
"markdown-it-container": "3.0.0",
|
"markdown-it-container": "4.0.0",
|
||||||
"markdown-it-deflist": "2.1.0",
|
"markdown-it-deflist": "4.0.0",
|
||||||
"markdown-it-emoji": "3.1.0",
|
"markdown-it-emoji": "3.1.0",
|
||||||
"markdown-it-footnote": "3.0.3",
|
"markdown-it-footnote": "4.0.0",
|
||||||
"markdown-it-imsize": "2.0.1",
|
"markdown-it-imsize": "2.0.1",
|
||||||
"markdown-it-ins": "3.0.1",
|
"markdown-it-ins": "4.0.0",
|
||||||
"markdown-it-mark": "3.0.1",
|
"markdown-it-mark": "4.0.0",
|
||||||
"markdown-it-mathjax": "2.0.0",
|
"markdown-it-mathjax": "2.0.0",
|
||||||
"markdown-it-regexp": "0.4.0",
|
"markdown-it-regexp": "0.4.0",
|
||||||
"markdown-it-sub": "1.0.0",
|
"markdown-it-sub": "2.0.0",
|
||||||
"markdown-it-sup": "1.0.0",
|
"markdown-it-sup": "2.0.0",
|
||||||
"mattermost": "3.4.0",
|
"mattermost": "3.4.0",
|
||||||
"method-override": "3.0.0",
|
"method-override": "3.0.0",
|
||||||
"minimist": "1.2.8",
|
"minimist": "1.2.8",
|
||||||
|
|||||||
@@ -11,9 +11,17 @@ import { escapeHtml, unescapeHtml } from './utils'
|
|||||||
|
|
||||||
import markdownit from 'markdown-it'
|
import markdownit from 'markdown-it'
|
||||||
import markdownitContainer from 'markdown-it-container'
|
import markdownitContainer from 'markdown-it-container'
|
||||||
|
import MarkdownItRegexpPlugin from 'markdown-it-regexp'
|
||||||
/* Defined regex markdown it plugins */
|
import MarkdownItAbbrPlugin from 'markdown-it-abbr'
|
||||||
import Plugin from 'markdown-it-regexp'
|
import MarkdownItFootnotePlugin from 'markdown-it-footnote'
|
||||||
|
import MarkdownItDeflistPlugin from 'markdown-it-deflist'
|
||||||
|
import MarkdownItMarkPlugin from 'markdown-it-mark'
|
||||||
|
import MarkdownItInsPlugin from 'markdown-it-ins'
|
||||||
|
import MarkdownItSubPlugin from 'markdown-it-sub'
|
||||||
|
import MarkdownItSupPlugin from 'markdown-it-sup'
|
||||||
|
import MarkdownItMathjaxPlugin from 'markdown-it-mathjax'
|
||||||
|
import { full as MarkdownItEmojiPlugin } from 'markdown-it-emoji'
|
||||||
|
import MarkdownItImsizePlugin from 'markdown-it-imsize'
|
||||||
|
|
||||||
require('prismjs/themes/prism.css')
|
require('prismjs/themes/prism.css')
|
||||||
require('prismjs/components/prism-wiki')
|
require('prismjs/components/prism-wiki')
|
||||||
@@ -1059,14 +1067,14 @@ export const md = markdownit('default', {
|
|||||||
})
|
})
|
||||||
window.md = md
|
window.md = md
|
||||||
|
|
||||||
md.use(require('markdown-it-abbr'))
|
md.use(MarkdownItAbbrPlugin)
|
||||||
md.use(require('markdown-it-footnote'))
|
md.use(MarkdownItFootnotePlugin)
|
||||||
md.use(require('markdown-it-deflist'))
|
md.use(MarkdownItDeflistPlugin)
|
||||||
md.use(require('markdown-it-mark'))
|
md.use(MarkdownItMarkPlugin)
|
||||||
md.use(require('markdown-it-ins'))
|
md.use(MarkdownItInsPlugin)
|
||||||
md.use(require('markdown-it-sub'))
|
md.use(MarkdownItSubPlugin)
|
||||||
md.use(require('markdown-it-sup'))
|
md.use(MarkdownItSupPlugin)
|
||||||
md.use(require('markdown-it-mathjax')({
|
md.use(MarkdownItMathjaxPlugin({
|
||||||
beforeMath: '<span class="mathjax raw">',
|
beforeMath: '<span class="mathjax raw">',
|
||||||
afterMath: '</span>',
|
afterMath: '</span>',
|
||||||
beforeInlineMath: '<span class="mathjax raw">\\(',
|
beforeInlineMath: '<span class="mathjax raw">\\(',
|
||||||
@@ -1074,9 +1082,9 @@ md.use(require('markdown-it-mathjax')({
|
|||||||
beforeDisplayMath: '<span class="mathjax raw">\\[',
|
beforeDisplayMath: '<span class="mathjax raw">\\[',
|
||||||
afterDisplayMath: '\\]</span>'
|
afterDisplayMath: '\\]</span>'
|
||||||
}))
|
}))
|
||||||
md.use(require('markdown-it-imsize'))
|
md.use(MarkdownItImsizePlugin)
|
||||||
|
|
||||||
md.use(require('markdown-it-emoji'), {
|
md.use(MarkdownItEmojiPlugin, {
|
||||||
shortcuts: {}
|
shortcuts: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1147,7 +1155,7 @@ md.renderer.rules.fence = (tokens, idx, options, env, self) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// youtube
|
// youtube
|
||||||
const youtubePlugin = new Plugin(
|
const youtubePlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/{%youtube\s*([\w-]{11})\s*%}/,
|
/{%youtube\s*([\w-]{11})\s*%}/,
|
||||||
|
|
||||||
@@ -1165,7 +1173,7 @@ const youtubePlugin = new Plugin(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
// vimeo
|
// vimeo
|
||||||
const vimeoPlugin = new Plugin(
|
const vimeoPlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/{%vimeo\s*(\d{6,11})\s*%}/,
|
/{%vimeo\s*(\d{6,11})\s*%}/,
|
||||||
|
|
||||||
@@ -1180,7 +1188,7 @@ const vimeoPlugin = new Plugin(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
// gist
|
// gist
|
||||||
const gistPlugin = new Plugin(
|
const gistPlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/{%gist\s*(\w+\/\w+)\s*%}/,
|
/{%gist\s*(\w+\/\w+)\s*%}/,
|
||||||
|
|
||||||
@@ -1190,14 +1198,14 @@ const gistPlugin = new Plugin(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
// TOC
|
// TOC
|
||||||
const tocPlugin = new Plugin(
|
const tocPlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/^\[TOC\]$/i,
|
/^\[TOC\]$/i,
|
||||||
|
|
||||||
(match, utils) => '<div class="toc"></div>'
|
(match, utils) => '<div class="toc"></div>'
|
||||||
)
|
)
|
||||||
// slideshare
|
// slideshare
|
||||||
const slidesharePlugin = new Plugin(
|
const slidesharePlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/{%slideshare\s*(\w+\/[\w-]+)\s*%}/,
|
/{%slideshare\s*(\w+\/[\w-]+)\s*%}/,
|
||||||
|
|
||||||
@@ -1209,7 +1217,7 @@ const slidesharePlugin = new Plugin(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
// speakerdeck
|
// speakerdeck
|
||||||
const speakerdeckPlugin = new Plugin(
|
const speakerdeckPlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/{%speakerdeck\s*(\w+\/[\w-]+)\s*%}/,
|
/{%speakerdeck\s*(\w+\/[\w-]+)\s*%}/,
|
||||||
|
|
||||||
@@ -1221,7 +1229,7 @@ const speakerdeckPlugin = new Plugin(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
// pdf
|
// pdf
|
||||||
const pdfPlugin = new Plugin(
|
const pdfPlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match
|
// regexp to match
|
||||||
/{%pdf\s*([\d\D]*?)\s*%}/,
|
/{%pdf\s*([\d\D]*?)\s*%}/,
|
||||||
|
|
||||||
@@ -1234,7 +1242,7 @@ const pdfPlugin = new Plugin(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const emojijsPlugin = new Plugin(
|
const emojijsPlugin = new MarkdownItRegexpPlugin(
|
||||||
// regexp to match emoji shortcodes :something:
|
// regexp to match emoji shortcodes :something:
|
||||||
// We generate an universal regex that guaranteed only contains the
|
// We generate an universal regex that guaranteed only contains the
|
||||||
// emojies we have available. This should prevent all false-positives
|
// emojies we have available. This should prevent all false-positives
|
||||||
|
|||||||
80
yarn.lock
80
yarn.lock
@@ -1545,18 +1545,18 @@ __metadata:
|
|||||||
lz-string: "git+https://github.com/hackmdio/lz-string.git#commit=6edfccb79cd8c210f03fd3bf18e41ca144fbeefb"
|
lz-string: "git+https://github.com/hackmdio/lz-string.git#commit=6edfccb79cd8c210f03fd3bf18e41ca144fbeefb"
|
||||||
mariadb: "npm:3.4.5"
|
mariadb: "npm:3.4.5"
|
||||||
markdown-it: "npm:14.1.1"
|
markdown-it: "npm:14.1.1"
|
||||||
markdown-it-abbr: "npm:1.0.4"
|
markdown-it-abbr: "npm:2.0.0"
|
||||||
markdown-it-container: "npm:3.0.0"
|
markdown-it-container: "npm:4.0.0"
|
||||||
markdown-it-deflist: "npm:2.1.0"
|
markdown-it-deflist: "npm:4.0.0"
|
||||||
markdown-it-emoji: "npm:3.1.0"
|
markdown-it-emoji: "npm:3.1.0"
|
||||||
markdown-it-footnote: "npm:3.0.3"
|
markdown-it-footnote: "npm:4.0.0"
|
||||||
markdown-it-imsize: "npm:2.0.1"
|
markdown-it-imsize: "npm:2.0.1"
|
||||||
markdown-it-ins: "npm:3.0.1"
|
markdown-it-ins: "npm:4.0.0"
|
||||||
markdown-it-mark: "npm:3.0.1"
|
markdown-it-mark: "npm:4.0.0"
|
||||||
markdown-it-mathjax: "npm:2.0.0"
|
markdown-it-mathjax: "npm:2.0.0"
|
||||||
markdown-it-regexp: "npm:0.4.0"
|
markdown-it-regexp: "npm:0.4.0"
|
||||||
markdown-it-sub: "npm:1.0.0"
|
markdown-it-sub: "npm:2.0.0"
|
||||||
markdown-it-sup: "npm:1.0.0"
|
markdown-it-sup: "npm:2.0.0"
|
||||||
mathjax: "npm:2.7.9"
|
mathjax: "npm:2.7.9"
|
||||||
mattermost: "npm:3.4.0"
|
mattermost: "npm:3.4.0"
|
||||||
mermaid: "npm:9.1.7"
|
mermaid: "npm:9.1.7"
|
||||||
@@ -9982,24 +9982,24 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-abbr@npm:1.0.4":
|
"markdown-it-abbr@npm:2.0.0":
|
||||||
version: 1.0.4
|
version: 2.0.0
|
||||||
resolution: "markdown-it-abbr@npm:1.0.4"
|
resolution: "markdown-it-abbr@npm:2.0.0"
|
||||||
checksum: 10/ee7d5ec4a99f17433f0071c9a8e16e8b79e3dd8ce89618a6d6e3aa1d04120965906d17e4cba1de5b29b3d1938b04d33693b936df0dd6fc1f093177b9625b95de
|
checksum: 10/23ca311db1261ec3459a5d87e07bf8b4b1312f4d268102d081d5a76acbd01cc83b9697a7af22dec244807826d83c7f92f5cf88088c40cabb6be8708ed44679dd
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-container@npm:3.0.0":
|
"markdown-it-container@npm:4.0.0":
|
||||||
version: 3.0.0
|
version: 4.0.0
|
||||||
resolution: "markdown-it-container@npm:3.0.0"
|
resolution: "markdown-it-container@npm:4.0.0"
|
||||||
checksum: 10/a4e2b38cce2d19139b1f77cedeed0e4a869ce6e7bea3c92caa68fb8dee1f690a8024d2eafb1f1be34c0e9c83e6411778c2e4c6bb3e913a0ea166a2cddf67bba3
|
checksum: 10/5e319bfd93c9c963e672c2c4ab296ce5425489f631438455f4d3e0f7a0b2dbf4317b081f706af10e5094099283b3ec3b475f929b4ab167ed6aaae58208e1df1f
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-deflist@npm:2.1.0":
|
"markdown-it-deflist@npm:4.0.0":
|
||||||
version: 2.1.0
|
version: 4.0.0
|
||||||
resolution: "markdown-it-deflist@npm:2.1.0"
|
resolution: "markdown-it-deflist@npm:4.0.0"
|
||||||
checksum: 10/e563e67e8e8dca73cb08545421517e835ce1393a071f20cec40783b9d4209d6cb71e0a4595662955545959cb920f3953ee0f69217f5b0cce1a48dca79ff886a5
|
checksum: 10/bb035a9766e51ff08bca79bde3a8c33366e0931d45c2782a3026ddbb8e95b7f7c23bd5240551c2ecbef8ae4282937e844d0843923988329d3c4507b3897247a7
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -10010,10 +10010,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-footnote@npm:3.0.3":
|
"markdown-it-footnote@npm:4.0.0":
|
||||||
version: 3.0.3
|
version: 4.0.0
|
||||||
resolution: "markdown-it-footnote@npm:3.0.3"
|
resolution: "markdown-it-footnote@npm:4.0.0"
|
||||||
checksum: 10/0e319295da1f7ad3d970e931f46c53f94beba313516df5d5da8cf9d6039a1c6fab1e4993e8f32b516d55b58d2e2c6d071090a97f46e734aaffbe8443ce54f7a5
|
checksum: 10/775e9d0a67fd268422bd2c141bbb88de94f6c08234ee0a76e719fe8753213ca6b82590f76e2643bf32104c7489adcbd37cddc33dbd2baef19dccff3e836a6da9
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -10024,17 +10024,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-ins@npm:3.0.1":
|
"markdown-it-ins@npm:4.0.0":
|
||||||
version: 3.0.1
|
version: 4.0.0
|
||||||
resolution: "markdown-it-ins@npm:3.0.1"
|
resolution: "markdown-it-ins@npm:4.0.0"
|
||||||
checksum: 10/f4ddc456bf67eeae872bd77146723cd6c6a035b2dfa4c8a6f282c1fc6eb35b503836ac567aee4d6550bbd5e67a014003f52bad4c28661387662e215c3c1ab2ae
|
checksum: 10/848ba55f85124c682de9324ba8a81b7dfe3c0e242a9a4f9a305ae5ae6ada280511b103f82b367012b98696c7d68ee21525efad0e34856bab0d6786ade321d67d
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-mark@npm:3.0.1":
|
"markdown-it-mark@npm:4.0.0":
|
||||||
version: 3.0.1
|
version: 4.0.0
|
||||||
resolution: "markdown-it-mark@npm:3.0.1"
|
resolution: "markdown-it-mark@npm:4.0.0"
|
||||||
checksum: 10/cb9d8bee158440938e615d9f2866b6ee3b98666aba7d4c1a78d9df2e0c121a23f2c9172d1f92680883eae9229794a5e6e7e15e76bfd151fadf8be2299330905f
|
checksum: 10/dbb2ea4da20d267e76433e9873b3ef103d5fd4eb93a453cc2653d61460a8c11dc16f0740100550090bcec12ae39dfa058562d92c7735fa0a445e68e09d73dc50
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -10052,17 +10052,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-sub@npm:1.0.0":
|
"markdown-it-sub@npm:2.0.0":
|
||||||
version: 1.0.0
|
version: 2.0.0
|
||||||
resolution: "markdown-it-sub@npm:1.0.0"
|
resolution: "markdown-it-sub@npm:2.0.0"
|
||||||
checksum: 10/8b5a71a11f718d787e591e22ed028adc789ba62dac6ca0e22a4714c9533868431a4227dbefb921be39ad3388c25fa019d9a510dffed865811ebcb2cbecbbf53d
|
checksum: 10/789e3c2b3a90622dbfa745d93cc1bb78e4e10b5ba7aa268426f113262ab1def2c65087aa83279cb4a869f6a38038a1e49bac6c518ba58aa445adf1f7695e4a77
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"markdown-it-sup@npm:1.0.0":
|
"markdown-it-sup@npm:2.0.0":
|
||||||
version: 1.0.0
|
version: 2.0.0
|
||||||
resolution: "markdown-it-sup@npm:1.0.0"
|
resolution: "markdown-it-sup@npm:2.0.0"
|
||||||
checksum: 10/9e593acb8c79dbb917645affde3c46ecb50baa59c740ffe4ecc7bfa470b5b746338f12c65219d6c4112f9f2b01b68cbd151aaabbac878f34e07c7120e5959324
|
checksum: 10/d7f421e5121c3d53de76d30459797bd6678b511ac3a3bc3d938880f7d26e83b88ac1e9d90eee7f13363e6e56001174319264baceb7f9288c9df7cdb6bd8c0beb
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user