/* * Vencord, a Discord client mod * Copyright (c) 2023 Vendicated and contributors * SPDX-License-Identifier: GPL-3.0-or-later */ import { findCssClassesLazy } from "@webpack"; import { Parser } from "@webpack/common"; const CodeContainerClasses = findCssClassesLazy("markup", "codeContainer"); /** * Renders code in a Discord codeblock */ export function CodeBlock(props: { content?: string, lang: string; }) { return (
{Parser.defaultRules.codeBlock.react(props, null, {})}
); } /** * Renders inline code like `this` */ export function InlineCode({ children }: { children: React.ReactNode; }) { return ( {children} ); }