Skip to content

Commit f2f37a0

Browse files
author
yzhang
committed
#943 upgrade katex to 0.13.5
1 parent 908d7ba commit f2f37a0

File tree

3 files changed

+39
-15
lines changed

3 files changed

+39
-15
lines changed

package-lock.json

Lines changed: 21 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@
511511
"test-compile": "tsc -p ./"
512512
},
513513
"dependencies": {
514-
"@neilsustc/markdown-it-katex": "^0.6.1",
514+
"@neilsustc/markdown-it-katex": "^0.13.5",
515515
"entities": "^2.2.0",
516516
"grapheme-splitter": "^1.0.4",
517517
"highlight.js": "^10.5.0",

src/completion.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,22 @@ class MdCompletionItemProvider implements CompletionItemProvider {
320320
'maltese', 'minuso'
321321
];
322322
debugging0 = ['message', 'errmessage', 'show']
323+
envs = [
324+
'matrix', 'array',
325+
'pmatrix', 'bmatrix',
326+
'vmatrix', 'Vmatrix',
327+
'Bmatrix',
328+
'cases', 'rcases',
329+
'smallmatrix', 'subarray',
330+
'equation', 'split', 'align',
331+
'gather', 'alignat',
332+
'CD',
333+
'darray', 'dcases', 'drcases',
334+
'matrix*', 'pmatrix*', 'bmatrix*',
335+
'Bmatrix*', 'vmatrix*', 'Vmatrix*',
336+
'equation*', 'gather*', 'align*', 'alignat*',
337+
'gathered', 'aligned', 'alignedat'
338+
]
323339

324340
mathCompletions: CompletionItem[];
325341

@@ -371,7 +387,7 @@ class MdCompletionItemProvider implements CompletionItemProvider {
371387
return item;
372388
});
373389
let envSnippet = new CompletionItem('\\begin', CompletionItemKind.Snippet);
374-
envSnippet.insertText = new SnippetString('begin{${1|aligned,alignedat,array,bmatrix,Bmatrix,cases,darray,dcases,gathered,matrix,pmatrix,rcases,smallmatrix,vmatrix,Vmatrix|}}\n\t$2\n\\end{$1}');
390+
envSnippet.insertText = new SnippetString('begin{${1|' + this.envs.join(',') + '|}}\n\t$2\n\\end{$1}');
375391

376392
// Pretend to support multi-workspacefolders
377393
let resource = null;

0 commit comments

Comments
 (0)