Skip to content

Commit 7f72fd1

Browse files
committed
ths fix doesn't seem to work: gatsbyjs/gatsby#28031 (comment)
1 parent 32c554a commit 7f72fd1

File tree

4 files changed

+42
-17
lines changed

4 files changed

+42
-17
lines changed

gatsby-config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ module.exports = {
1717
},
1818
remarkPlugins: [
1919
require('remark-math'),
20-
require('remark-html-katex'),
20+
// require('remark-html-katex'),
21+
],
22+
rehypePlugins: [
23+
require('rehype-katex')
2124
],
2225
},
2326
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@mdx-js/react": "v2.0.0-next.8",
1313
"gatsby-plugin-mdx": "1.4.0",
1414
"gatsby-source-filesystem": "2.5.0",
15-
"remark-html-katex": "3.0.0",
15+
"rehype-katex": "4.0.0",
1616
"remark-math": "3.0.1"
1717
},
1818
"scripts": {

src/pages/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ Also inline $a^2 + b^2 = c^2$ as you can see.
1515

1616
"Complex" Katex does not work:
1717

18-
```
18+
1919
$$
2020
\begin{aligned}
2121
\bar{x} &= \dfrac{0+1+2+ \ldots +8}{9} = 3.56 \\
2222
\bar{y} &= \dfrac{23.5+25+ \ldots +37.5}{9}=30
2323
\end{aligned}
2424
$$
25-
```
25+
2626

2727
Another example that doesn't work:
2828

29-
```
29+
3030
$x < 3$
31-
```
31+
3232

3333
> _(⚠️ remove the surrounding backticks to see the error)_
3434

yarn.lock

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6156,6 +6156,11 @@ hast-util-from-parse5@^6.0.0:
61566156
vfile-location "^3.2.0"
61576157
web-namespaces "^1.0.0"
61586158

6159+
hast-util-is-element@^1.0.0:
6160+
version "1.1.0"
6161+
resolved "https://registry.yarnpkg.com/hast-util-is-element/-/hast-util-is-element-1.1.0.tgz#3b3ed5159a2707c6137b48637fbfe068e175a425"
6162+
integrity sha512-oUmNua0bFbdrD/ELDSSEadRVtWZOf3iF6Lbv81naqsIV99RnSCieTbWuWCY8BAeEfKJTKl0gRdokv+dELutHGQ==
6163+
61596164
hast-util-parse-selector@^2.0.0:
61606165
version "2.2.5"
61616166
resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a"
@@ -6188,6 +6193,15 @@ hast-util-to-parse5@^6.0.0:
61886193
xtend "^4.0.0"
61896194
zwitch "^1.0.0"
61906195

6196+
hast-util-to-text@^2.0.0:
6197+
version "2.0.1"
6198+
resolved "https://registry.yarnpkg.com/hast-util-to-text/-/hast-util-to-text-2.0.1.tgz#04f2e065642a0edb08341976084aa217624a0f8b"
6199+
integrity sha512-8nsgCARfs6VkwH2jJU9b8LNTuR4700na+0h3PqCaEk4MAnMDeu5P0tP8mjk9LLNGxIeQRLbiDbZVw6rku+pYsQ==
6200+
dependencies:
6201+
hast-util-is-element "^1.0.0"
6202+
repeat-string "^1.0.0"
6203+
unist-util-find-after "^3.0.0"
6204+
61916205
hastscript@^6.0.0:
61926206
version "6.0.0"
61936207
resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640"
@@ -9980,6 +9994,18 @@ regjsparser@^0.6.4:
99809994
dependencies:
99819995
jsesc "~0.5.0"
99829996

9997+
9998+
version "4.0.0"
9999+
resolved "https://registry.yarnpkg.com/rehype-katex/-/rehype-katex-4.0.0.tgz#ce11a5db0bff014350e7a9cfd30147d314b14330"
10000+
integrity sha512-0mgBqYugQyIW0eUl6RDOZ28Cat2YzrnWGaYgKCMQnJw6ClmKgLqXBnkDAPGh2mwxvkkKwQOUMUpSLpA5rt7rzA==
10001+
dependencies:
10002+
"@types/katex" "^0.11.0"
10003+
hast-util-to-text "^2.0.0"
10004+
katex "^0.12.0"
10005+
rehype-parse "^7.0.0"
10006+
unified "^9.0.0"
10007+
unist-util-visit "^2.0.0"
10008+
998310009
rehype-parse@^7.0.0:
998410010
version "7.0.1"
998510011
resolved "https://registry.yarnpkg.com/rehype-parse/-/rehype-parse-7.0.1.tgz#58900f6702b56767814afc2a9efa2d42b1c90c57"
@@ -9993,17 +10019,6 @@ [email protected]:
999310019
resolved "https://registry.yarnpkg.com/remark-footnotes/-/remark-footnotes-1.0.0.tgz#9c7a97f9a89397858a50033373020b1ea2aad011"
999410020
integrity sha512-X9Ncj4cj3/CIvLI2Z9IobHtVi8FVdUrdJkCNaL9kdX8ohfsi18DXHsCVd/A7ssARBdccdDb5ODnt62WuEWaM/g==
999510021

9996-
9997-
version "3.0.0"
9998-
resolved "https://registry.yarnpkg.com/remark-html-katex/-/remark-html-katex-3.0.0.tgz#09b047e70a398e0c9c762a21c803e4ce73d39cb6"
9999-
integrity sha512-T8PqHlQ8ftOPqxh0XoRNSRKHhSOoIJLnmeeOvdsPz2VOy8hMFC4IFVKA6EPdWFzXRZeT+pCjewVh0dg++vVYHQ==
10000-
dependencies:
10001-
"@types/katex" "^0.11.0"
10002-
katex "^0.12.0"
10003-
rehype-parse "^7.0.0"
10004-
unified "^9.0.0"
10005-
unist-util-visit "^2.0.0"
10006-
1000710022
1000810023
version "3.0.1"
1000910024
resolved "https://registry.yarnpkg.com/remark-math/-/remark-math-3.0.1.tgz#85a02a15b15cad34b89a27244d4887b3a95185bb"
@@ -11776,6 +11791,13 @@ [email protected], unist-builder@^2.0.0:
1177611791
resolved "https://registry.yarnpkg.com/unist-builder/-/unist-builder-2.0.3.tgz#77648711b5d86af0942f334397a33c5e91516436"
1177711792
integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==
1177811793

11794+
unist-util-find-after@^3.0.0:
11795+
version "3.0.0"
11796+
resolved "https://registry.yarnpkg.com/unist-util-find-after/-/unist-util-find-after-3.0.0.tgz#5c65fcebf64d4f8f496db46fa8fd0fbf354b43e6"
11797+
integrity sha512-ojlBqfsBftYXExNu3+hHLfJQ/X1jYY/9vdm4yZWjIbf0VuWF6CRufci1ZyoD/wV2TYMKxXUoNuoqwy+CkgzAiQ==
11798+
dependencies:
11799+
unist-util-is "^4.0.0"
11800+
1177911801
unist-util-generated@^1.0.0:
1178011802
version "1.1.6"
1178111803
resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.6.tgz#5ab51f689e2992a472beb1b35f2ce7ff2f324d4b"

0 commit comments

Comments
 (0)