Add strict: false and trust: true to KaTeX plugin configuration
• Relaxes KaTeX parsing rules • Enables trusted LaTeX commands • Improves math rendering compatibility • Applied to both markdown processors
This commit is contained in:
parent
b4cc249dca
commit
72039e0b4e
1 changed files with 10 additions and 2 deletions
|
|
@ -138,7 +138,13 @@ export const ChatMessage = ({ message }: { message: MessageWithError }) => { //
|
|||
remarkPlugins={[remarkGfm, remarkFootnotes, remarkMath]}
|
||||
rehypePlugins={[
|
||||
rehypeRaw,
|
||||
...(katexPlugin ? [[katexPlugin, { errorColor: theme === 'dark' ? '#ef4444' : '#dc2626', throwOnError: false, displayMode: false }] as any] : []),
|
||||
...(katexPlugin ? [[katexPlugin, {
|
||||
errorColor: theme === 'dark' ? '#ef4444' : '#dc2626',
|
||||
throwOnError: false,
|
||||
displayMode: false,
|
||||
strict: false,
|
||||
trust: true
|
||||
}] as any] : []),
|
||||
rehypeReact
|
||||
]}
|
||||
skipHtml={false}
|
||||
|
|
@ -167,7 +173,9 @@ export const ChatMessage = ({ message }: { message: MessageWithError }) => { //
|
|||
{
|
||||
errorColor: theme === 'dark' ? '#ef4444' : '#dc2626',
|
||||
throwOnError: false,
|
||||
displayMode: false
|
||||
displayMode: false,
|
||||
strict: false,
|
||||
trust: true
|
||||
}
|
||||
] as any] : []),
|
||||
rehypeReact
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue