import { cn } from '@gentleduck/libs/cn' interface ICodeProps extends React.HTMLAttributes { __dmcRaw__?: boolean 'data-language'?: string } export function CodeBlock({ className, __dmcRaw__, ...props }: ICodeProps) { // Fenced code: pretty-code emits `data-language` on AND wraps // it in a
. Either signal switches to block styling
  // (transparent bg, grid layout, no padding — the surrounding 
  // owns the chrome). Bare inline  gets the chip style.
  const isFenced = __dmcRaw__ != null || props['data-language'] != null

  if (isFenced) {
    return (
      
    )
  }

  return (
    `/`

`/… tracks the // heading size; default to the parent's `text-sm` equivalent // when rendered inside a paragraph. 'relative rounded-sm bg-muted px-[0.3rem] py-[0.2rem] font-mono text-[0.875em] dark:bg-muted', className, )} {...props} /> ) }