mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
adds markdown support, fix code wrapping
This commit is contained in:
parent
c58a9bbe93
commit
fd01fd3334
9 changed files with 1545 additions and 115 deletions
|
|
@ -3,4 +3,42 @@ import { twMerge } from 'tailwind-merge';
|
|||
|
||||
export function cn(...inputs) {
|
||||
return twMerge(clsx(inputs));
|
||||
}
|
||||
}
|
||||
|
||||
export const languages = [
|
||||
'java',
|
||||
'c',
|
||||
'markdown',
|
||||
'css',
|
||||
'html',
|
||||
'xml',
|
||||
'bash',
|
||||
'json',
|
||||
'yaml',
|
||||
'jsx',
|
||||
'python',
|
||||
'c++',
|
||||
'javascript',
|
||||
'csharp',
|
||||
'php',
|
||||
'typescript',
|
||||
'swift',
|
||||
'objectivec',
|
||||
'sql',
|
||||
'r',
|
||||
'kotlin',
|
||||
'ruby',
|
||||
'go',
|
||||
'x86asm',
|
||||
'matlab',
|
||||
'perl',
|
||||
'pascal'
|
||||
];
|
||||
|
||||
export const wrapperRegex = {
|
||||
codeRegex: /(```[\s\S]*?```)/g,
|
||||
inLineRegex: /(`[^`]+?`)/g,
|
||||
matchRegex: /(`[^`]+?`)/g,
|
||||
languageMatch: /^```(\w+)/,
|
||||
newLineMatch: /^```(\n+)/
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue