mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
added support for markdown-it-abbr (#238)
this makes it possible to use abbreviations like these ``` *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium The HTML specification is maintained by the W3C. ``` Co-authored-by: Philip Molares <philip@mauricedoepke.de>
This commit is contained in:
parent
09c21e4334
commit
4852727f92
4 changed files with 14 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
|||
"i18next-browser-languagedetector": "5.0.0",
|
||||
"i18next-http-backend": "1.0.15",
|
||||
"markdown-it": "11.0.0",
|
||||
"markdown-it-abbr": "^1.0.4",
|
||||
"markdown-it-deflist": "^2.0.3",
|
||||
"markdown-it-emoji": "1.4.0",
|
||||
"markdown-it-ins": "^3.0.0",
|
||||
|
|
|
@ -2,6 +2,7 @@ import MarkdownIt from 'markdown-it'
|
|||
import emoji from 'markdown-it-emoji'
|
||||
import markdownItRegex from 'markdown-it-regex'
|
||||
import taskList from 'markdown-it-task-lists'
|
||||
import abbreviation from 'markdown-it-abbr'
|
||||
import definitionList from 'markdown-it-deflist'
|
||||
import subscript from 'markdown-it-sub'
|
||||
import superscript from 'markdown-it-sup'
|
||||
|
@ -40,6 +41,7 @@ const MarkdownPreview: React.FC<MarkdownPreviewProps> = ({ content }) => {
|
|||
})
|
||||
md.use(taskList)
|
||||
md.use(emoji)
|
||||
md.use(abbreviation)
|
||||
md.use(definitionList)
|
||||
md.use(subscript)
|
||||
md.use(superscript)
|
||||
|
|
6
src/external-types/markdown-it-abbr/index.d.ts
vendored
Normal file
6
src/external-types/markdown-it-abbr/index.d.ts
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
declare module 'markdown-it-abbr' {
|
||||
import MarkdownIt from 'markdown-it/lib'
|
||||
const markdownItAbbreviation: MarkdownIt.PluginSimple
|
||||
export = markdownItAbbreviation
|
||||
}
|
|
@ -7270,6 +7270,11 @@ map-visit@^1.0.0:
|
|||
dependencies:
|
||||
object-visit "^1.0.0"
|
||||
|
||||
markdown-it-abbr@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-abbr/-/markdown-it-abbr-1.0.4.tgz#d66b5364521cbb3dd8aa59dadfba2fb6865c8fd8"
|
||||
integrity sha1-1mtTZFIcuz3Yqlna37ovtoZcj9g=
|
||||
|
||||
markdown-it-deflist@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-deflist/-/markdown-it-deflist-2.0.3.tgz#5727db04184d3cb2bc6ee4a9641e3a1091d5fd6f"
|
||||
|
|
Loading…
Reference in a new issue