Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rehype-katex

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-katex - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

index.d.ts.map

3

index.d.ts
export { default } from "./lib/index.js";
export type Options = import('./lib/index.js').Options;
export type Options = import("./lib/index.js").Options;
//# sourceMappingURL=index.d.ts.map

@@ -11,6 +11,6 @@ /**

export default function rehypeKatex(options?: Readonly<Options> | null | undefined): (tree: Root, file: VFile) => undefined;
export type ElementContent = import('hast').ElementContent;
export type Root = import('hast').Root;
export type KatexOptions = import('katex').KatexOptions;
export type VFile = import('vfile').VFile;
export type Options = Omit<KatexOptions, 'displayMode' | 'throwOnError'>;
export type Options = Omit<katex.KatexOptions, "displayMode" | "throwOnError">;
import type { Root } from 'hast';
import type { VFile } from 'vfile';
import katex from 'katex';
//# sourceMappingURL=index.d.ts.map
/**
* @typedef {import('hast').ElementContent} ElementContent
* @typedef {import('hast').Root} Root
*
* @typedef {import('katex').KatexOptions} KatexOptions
*
* @typedef {import('vfile').VFile} VFile
* @import {ElementContent, Root} from 'hast'
* @import {KatexOptions} from 'katex'
* @import {VFile} from 'vfile'
*/

@@ -107,4 +104,6 @@

// KaTeX can handle `ParseError` itself, but not others.
if (ruleId === 'parseerror') {
// KaTeX *should* handle `ParseError` itself, but not others.
// it doesn’t always:
// <https://github.com/remarkjs/react-markdown/issues/853>
try {
result = katex.renderToString(value, {

@@ -116,6 +115,5 @@ ...settings,

})
}
// Generate similar markup if this is an other error.
// See: <https://github.com/KaTeX/KaTeX/blob/5dc7af0/docs/error.md>.
else {
} catch {
// Generate similar markup if this is an other error.
// See: <https://github.com/KaTeX/KaTeX/blob/5dc7af0/docs/error.md>.
result = [

@@ -122,0 +120,0 @@ {

{
"name": "rehype-katex",
"version": "7.0.0",
"version": "7.0.1",
"description": "rehype plugin to transform inline and block math with KaTeX",

@@ -37,2 +37,3 @@ "license": "MIT",

"lib/",
"index.d.ts.map",
"index.d.ts",

@@ -39,0 +40,0 @@ "index.js"

@@ -16,18 +16,18 @@ # rehype-katex

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(rehypeKatex[, options])`](#unifieduserehypekatex-options)
* [`Options`](#options)
* [Markdown](#markdown)
* [HTML](#html)
* [CSS](#css)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(rehypeKatex[, options])`](#unifieduserehypekatex-options)
* [`Options`](#options)
* [Markdown](#markdown)
* [HTML](#html)
* [CSS](#css)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)

@@ -144,4 +144,4 @@ ## What is this?

* `options` ([`Options`][api-options])
— configuration
* `options` ([`Options`][api-options])
— configuration

@@ -255,12 +255,12 @@ ###### Returns

* [`rehype-mathjax`][rehype-mathjax]
— same but with MathJax
* [`rehype-highlight`](https://github.com/rehypejs/rehype-highlight)
— highlight code blocks
* [`rehype-autolink-headings`](https://github.com/rehypejs/rehype-autolink-headings)
— add links to headings
* [`rehype-sanitize`](https://github.com/rehypejs/rehype-sanitize)
— sanitize HTML
* [`rehype-document`](https://github.com/rehypejs/rehype-document)
— wrap a document around the tree
* [`rehype-mathjax`][rehype-mathjax]
— same but with MathJax
* [`rehype-highlight`](https://github.com/rehypejs/rehype-highlight)
— highlight code blocks
* [`rehype-autolink-headings`](https://github.com/rehypejs/rehype-autolink-headings)
— add links to headings
* [`rehype-sanitize`](https://github.com/rehypejs/rehype-sanitize)
— sanitize HTML
* [`rehype-document`](https://github.com/rehypejs/rehype-document)
— wrap a document around the tree

@@ -267,0 +267,0 @@ ## Contribute

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc