replace markdown-it-katex with markdown-it-texmath, this makes using $ much better (#1116)

pull/1119/head
Caleb John 2019-01-10 11:33:49 -07:00 committed by Laurent Cozic
parent ef56eb4a52
commit 46b82f877b
5 changed files with 177 additions and 797 deletions

File diff suppressed because it is too large Load Diff

View File

@ -103,7 +103,7 @@
"lodash": "^4.17.10",
"mark.js": "^8.11.1",
"markdown-it": "^8.4.1",
"markdown-it-katex": "^2.0.3",
"markdown-it-texmath": "^0.5.3",
"md5": "^2.2.1",
"mermaid": "^8.0.0-rc.8",
"mime": "^2.3.1",

View File

@ -467,9 +467,8 @@ class MdToHtml {
// This is currently used only so that the $expression$ and $$\nexpression\n$$ blocks are translated
// to math_inline and math_block blocks. These blocks are then processed directly with the Katex
// library. It is better this way as then it is possible to conditionally load the CSS required by
// Katex and use an up-to-date version of Katex (as of 2018, the plugin is still using 0.6, which is
// buggy instead of 0.9).
md.use(require('markdown-it-katex'));
// Katex and handle rendering of katex ourselves (this one is prone to be buggy).
md.use(require('markdown-it-texmath'));
// Hack to make checkboxes clickable. Ideally, checkboxes should be parsed properly in
// renderTokens_(), but for now this hack works. Marking it with HORRIBLE_HACK so

View File

@ -5126,28 +5126,10 @@
"uc.micro": "^1.0.3"
}
},
"markdown-it-katex": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/markdown-it-katex/-/markdown-it-katex-2.0.3.tgz",
"integrity": "sha1-17hqGuoLnWSW+rTnkZoY/e9YnDk=",
"requires": {
"katex": "^0.6.0"
},
"dependencies": {
"katex": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/katex/-/katex-0.6.0.tgz",
"integrity": "sha1-EkGOCRIcBckgQbazuftrqyE8tvM=",
"requires": {
"match-at": "^0.1.0"
}
}
}
},
"match-at": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/match-at/-/match-at-0.1.1.tgz",
"integrity": "sha512-h4Yd392z9mST+dzc+yjuybOGFNOZjmXIPKWjxBd1Bb23r4SmDOsk2NYCU2BMUBGbSpZqwVsZYNq26QS3xfaT3Q=="
"markdown-it-texmath": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/markdown-it-texmath/-/markdown-it-texmath-0.5.3.tgz",
"integrity": "sha512-F7uGF7gM1fgTinPeRZDeUK3aA4f9TPWtCcAOEKvIfuh8XNlBAF29U1XuQL9jS+yYUL+DF2ZUSjfqpNuyQBN9Iw=="
},
"md5": {
"version": "2.2.1",
@ -5306,7 +5288,7 @@
},
"load-json-file": {
"version": "2.0.0",
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"requires": {
"graceful-fs": "^4.1.2",
@ -6574,7 +6556,7 @@
},
"load-json-file": {
"version": "2.0.0",
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"requires": {
"graceful-fs": "^4.1.2",
@ -8967,7 +8949,7 @@
"dependencies": {
"uuid": {
"version": "3.0.1",
"resolved": "http://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
"integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE="
}
}

View File

@ -18,7 +18,7 @@
"html-entities": "^1.2.1",
"katex": "^0.10.0",
"markdown-it": "^8.4.0",
"markdown-it-katex": "^2.0.3",
"markdown-it-texmath": "^0.5.3",
"md5": "^2.2.1",
"moment": "^2.18.1",
"prop-types": "^15.6.0",