MCPcopy Create free account
hub / github.com/Qinbf/groundmap / a

Function a

tools/debug-console/components/MessageBubble.tsx:200–222  ·  view source on GitHub ↗
({ href, children, ...rest })

Source from the content-addressed store, hash-verified

198 remarkPlugins={[remarkGfm]}
199 components={{
200 a({ href, children, ...rest }) {
201 const ref = href ? hrefToRef(href) : null;
202 if (ref) {
203 return (
204 <a
205 href={href}
206 onClick={(e) => {
207 e.preventDefault();
208 onOpenRef(ref);
209 }}
210 className="border border-[var(--line)] bg-[var(--amber-bg)] px-1 py-[1px] font-mono text-[11.5px] text-[var(--amber)] no-underline hover:bg-[var(--amber)] hover:text-[var(--ink)]"
211 title={`${ref.path}${ref.anchor ? (ref.isBlock ? "#^" : "#") + ref.anchor : ""}`}
212 >
213 {children}
214 </a>
215 );
216 }
217 return (
218 <a href={href} target="_blank" rel="noreferrer" {...rest}>
219 {children}
220 </a>
221 );
222 },
223 }}
224 >
225 {inlineWikiRefsNumbered(cleanRefs(part.text), refMap)}

Callers

nothing calls this directly

Calls 1

hrefToRefFunction · 0.90

Tested by

no test coverage detected