mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Add optional pre-process callback to the auto-renderer. (#1784)
* Add optional pre-process callback to the auto-renderer. * Rewrite `preProcess` callback signature. * Add test. * Make test future-proof. * Add root folder to the node module paths.
This commit is contained in:
committed by
Kevin Barabash
parent
ce3840d4ce
commit
f10de9617e
@@ -99,6 +99,9 @@ in addition to two auto-render-specific keys:
|
||||
- `errorCallback`: A callback method returning a message and an error stack
|
||||
in case of an critical error during rendering. The default uses `console.error`.
|
||||
|
||||
- `preProcess`: A callback function, `(math: string) => string`, used to process
|
||||
math expressions before rendering.
|
||||
|
||||
The `displayMode` property of the options object is ignored, and is
|
||||
instead taken from the `display` key of the corresponding entry in the
|
||||
`delimiters` key.
|
||||
|
Reference in New Issue
Block a user