MCPcopy
hub / github.com/agentsmd/agents.md / renderLineWithInlineCode

Function renderLineWithInlineCode

components/CodeExample.tsx:106–121  ·  view source on GitHub ↗

* Render a line with inline code highlighting

(line: string)

Source from the content-addressed store, hash-verified

104 * Render a line with inline code highlighting
105 */
106function renderLineWithInlineCode(line: string): React.ReactNode {
107 const parts = line.split(/(`[^`]+`)/g);
108
109 return parts.map((part, index) => {
110 if (part.startsWith("`") && part.endsWith("`")) {
111 // This is inline code
112 return (
113 <span key={index} className="bg-gray-200 dark:bg-gray-800 px-1 rounded">
114 {part}
115 </span>
116 );
117 }
118 // Regular text
119 return part;
120 });
121}
122
123/**
124 * Markdown block for AGENTS.md examples.

Callers 1

parseMarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected