mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
Add configurable error callback (#658)
Replace console.error with a configurable option. This mimcs the current default behaviour to guaranteee compatibility with previous versions. Update errorCallback to the README.md
This commit is contained in:
committed by
Kevin Barabash
parent
2da06d541e
commit
2eb32a8775
@@ -83,8 +83,11 @@ in addition to two auto-render-specific keys:
|
||||
|
||||
- `ignoredTags`: This is a list of DOM node types to ignore when recursing
|
||||
through. The default value is
|
||||
`["script", "noscript", "style", "textarea", "pre", "code"]`.
|
||||
`["script", "noscript", "style", "textarea", "pre", "code"]`.
|
||||
|
||||
- `errorCallback`: A callback method returning a message and an error stack
|
||||
in case of an critical error during rendering. The default uses `console.error`.
|
||||
|
||||
Note that 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.
|
||||
`delimiters` key.
|
Reference in New Issue
Block a user