Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/rehype-katex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
],
"dependencies": {
"@types/hast": "^3.0.0",
"@types/katex": "^0.16.0",
"hast-util-from-html-isomorphic": "^2.0.0",
"hast-util-to-text": "^4.0.0",
"katex": "^0.16.0",
"katex": "^0.19.0",
"unist-util-visit-parents": "^6.0.0",
"vfile": "^6.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/rehype-katex/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const file = await unified()
.use(rehypeParse, {fragment: true})
.use(rehypeDocument, {
// Get the latest one from: <https://katex.org/docs/browser>.
css: 'https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css'
css: 'https://cdn.jsdelivr.net/npm/katex@0.19.0/dist/katex.min.css'
})
.use(rehypeKatex)
.use(rehypeStringify)
Expand All @@ -114,7 +114,7 @@ await write(file)
<meta charset="utf-8">
<title>input</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<link href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/katex@0.19.0/dist/katex.min.css" rel="stylesheet">
</head>
<body>
<p>
Expand Down Expand Up @@ -190,7 +190,7 @@ At the time of writing, the last version is:

```html
<!-- Get the latest one from: https://katex.org/docs/browser -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.19.0/dist/katex.min.css">
```

## Types
Expand Down
4 changes: 2 additions & 2 deletions packages/rehype-katex/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ test('rehype-katex', async function (t) {
.use(rehypeKatex)
.use(rehypeStringify)
.process(
'<span class="math-display">\\begin{split}\n\\end{{split}}\n</span>'
'<span class="math-display">\\begin{array}{{c}}\na\n\\end{array}\n</span>'
)
),
String(
await unified()
.use(rehypeParse, {fragment: true})
.use(rehypeStringify)
.process(
'<span class="katex-error" style="color:#cc0000" title="Error: Expected node of type textord, but got node of type ordgroup">\\begin{split}\n\\end{{split}}\n</span>'
'<span class="katex-error" style="color:#cc0000" title="Error: Expected node of symbol group type, but got node of type ordgroup">\\begin{array}{{c}}\na\n\\end{array}\n</span>'
)
)
)
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ equation.</p>
>
> ```html
> <!-- Get the latest one from: https://katex.org/docs/browser -->
> <link href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" rel="stylesheet">
> <link href="https://cdn.jsdelivr.net/npm/katex@0.19.0/dist/katex.min.css" rel="stylesheet">
> ```

### Example: MathJax
Expand Down
Loading