({ href, children, ...rest })
| 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)} |
nothing calls this directly
no test coverage detected