Skip to content

Commit

Permalink
✨ feat: add github-alerts support (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
prazdevs authored Dec 17, 2023
1 parent c271b16 commit 09be4ab
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 43 deletions.
83 changes: 43 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,10 @@
"markdown.markdownItPlugins": true,
"markdown.previewStyles": [
"./media/checkbox.css",
"./node_modules/katex/dist/katex.min.css"
"./node_modules/katex/dist/katex.min.css",
"./node_modules/markdown-it-github-alerts/styles/github-colors-light.css",
"./node_modules/markdown-it-github-alerts/styles/github-colors-dark-media.css",
"./node_modules/markdown-it-github-alerts/styles/github-base.css"
],
"grammars": [
{
Expand Down Expand Up @@ -673,14 +676,15 @@
"highlight.js": "^11.5.1",
"image-size": "^0.9.3",
"katex": "^0.16.4",
"markdown-it": "^12.3.2",
"markdown-it": "^13.0.2",
"markdown-it-github-alerts": "^0.1.2",
"markdown-it-task-lists": "^2.1.1",
"string-similarity": "^4.0.4"
},
"devDependencies": {
"@types/glob": "^7.2.0",
"@types/katex": "^0.14.0",
"@types/markdown-it": "^12.2.3",
"@types/markdown-it": "^13.0.7",
"@types/mocha": "^9.1.0",
"@types/node": "~14.18.13",
"@types/string-similarity": "^4.0.0",
Expand Down
1 change: 1 addition & 0 deletions src/markdown-it-plugin-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const katexOptions: KatexOptions = { throwOnError: false };
*/
export function extendMarkdownIt(md: MarkdownIt): MarkdownIt {
md.use(require("markdown-it-task-lists"), {enabled: true});
md.use(require("markdown-it-github-alerts"))

if (configManager.get("math.enabled")) {
// We need side effects. (#521)
Expand Down

0 comments on commit 09be4ab

Please sign in to comment.