MCPcopy Create free account
hub / github.com/Noumena-Network/code / Markdown

Function Markdown

src/components/Markdown.tsx:208–231  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

206 * - Other content is rendered as ANSI strings via formatToken
207 */
208export function Markdown(props) {
209 const $ = _c(4);
210 const settings = useSettings();
211 if (settings.syntaxHighlightingDisabled) {
212 let t0;
213 if ($[0] !== props) {
214 t0 = <MarkdownBody {...props} highlight={null} />;
215 $[0] = props;
216 $[1] = t0;
217 } else {
218 t0 = $[1];
219 }
220 return t0;
221 }
222 let t0;
223 if ($[2] !== props) {
224 t0 = <Suspense fallback={<MarkdownBody {...props} highlight={null} />}><MarkdownWithHighlight {...props} /></Suspense>;
225 $[2] = props;
226 $[3] = t0;
227 } else {
228 t0 = $[3];
229 }
230 return t0;
231}
232function MarkdownWithHighlight(props) {
233 const $ = _c(4);
234 let t0;

Callers

nothing calls this directly

Calls 1

useSettingsFunction · 0.85

Tested by

no test coverage detected