Skip to main content
Glama
syntax-highlighter.tsx1.19 kB
import { PrismAsyncLight as SyntaxHighlighterPrism } from "react-syntax-highlighter"; import tsx from "react-syntax-highlighter/dist/esm/languages/prism/tsx"; import python from "react-syntax-highlighter/dist/esm/languages/prism/python"; import { coldarkDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; import { FC } from "react"; // Register languages you want to support SyntaxHighlighterPrism.registerLanguage("js", tsx); SyntaxHighlighterPrism.registerLanguage("jsx", tsx); SyntaxHighlighterPrism.registerLanguage("ts", tsx); SyntaxHighlighterPrism.registerLanguage("tsx", tsx); SyntaxHighlighterPrism.registerLanguage("python", python); interface SyntaxHighlighterProps { children: string; language: string; className?: string; } export const SyntaxHighlighter: FC<SyntaxHighlighterProps> = ({ children, language, className, }) => { return ( <SyntaxHighlighterPrism language={language} style={coldarkDark} customStyle={{ margin: 0, width: "100%", background: "transparent", padding: "1.5rem 1rem", }} className={className} > {children} </SyntaxHighlighterPrism> ); };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/myeong-ga/research-agent-mcp-0.36-pro-preview-06-01'

If you have feedback or need assistance with the MCP directory API, please join our Discord server