mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
complete language detection for code blocks
This commit is contained in:
parent
c4d0787b49
commit
d235bb7b1b
10 changed files with 133 additions and 37 deletions
|
|
@ -1,11 +1,11 @@
|
|||
import React from 'react';
|
||||
|
||||
export default function Embed({ children, language = ''}) {
|
||||
export default function Embed({ children, language = '', matched}) {
|
||||
return (
|
||||
<pre>
|
||||
<div className="mb-4 rounded-md bg-black">
|
||||
<div className="relative flex items-center bg-gray-800 px-4 py-2 font-sans text-xs text-gray-200 rounded-tl-md rounded-tr-md">
|
||||
<span className="">{ language }</span>
|
||||
<span className="">{ (language === 'javascript' && !matched ? '' : language) }</span>
|
||||
<button className="ml-auto flex gap-2">
|
||||
<svg
|
||||
stroke="currentColor"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue