diff --git a/types/markdown-it/index.d.ts b/types/markdown-it/index.d.ts index e4b46fb49aa2f9..03fab3f815b275 100644 --- a/types/markdown-it/index.d.ts +++ b/types/markdown-it/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for markdown-it v10.0.0 +// Type definitions for markdown-it v12.0.2 // Project: https://github.com/markdown-it/markdown-it // Definitions by: York Yao // Robert Coie diff --git a/types/markdown-it/lib/index.d.ts b/types/markdown-it/lib/index.d.ts index fda1d248683a06..126f8518335876 100644 --- a/types/markdown-it/lib/index.d.ts +++ b/types/markdown-it/lib/index.d.ts @@ -82,12 +82,12 @@ declare namespace MarkdownIt { /** * Highlighter function for fenced code blocks. - * Highlighter `function (str, lang)` should return escaped HTML. It can also - * return empty string if the source was not changed and should be escaped - * externaly. If result starts with string) | null; + highlight?: ((str: string, lang: string, attrs: string) => string) | null; } type PluginSimple = (md: MarkdownIt) => void; diff --git a/types/markdown-it/package.json b/types/markdown-it/package.json index 8e8e452b5d49d6..68c2ce3ccd7c52 100644 --- a/types/markdown-it/package.json +++ b/types/markdown-it/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "highlight.js": "^9.7.0", "@types/highlight.js": "^9.7.0" } } diff --git a/types/markdown-it/test/index.ts b/types/markdown-it/test/index.ts index d818113c85bbe6..0272444c27ab89 100644 --- a/types/markdown-it/test/index.ts +++ b/types/markdown-it/test/index.ts @@ -46,6 +46,18 @@ import LinkifyIt = require('linkify-it'); quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, highlight: null, }; + + // highlight + options = { + html: false, + xhtmlOut: false, + breaks: false, + langPrefix: 'language-', + linkify: false, + typographer: false, + quotes: '\u201c\u201d\u2018\u2019' /* “”‘’ */, + highlight: function(str, lang, attrs) { return ""; }, + }; } {