diff --git a/apps/ai-hero/src/app/(content)/[post]/page.tsx b/apps/ai-hero/src/app/(content)/[post]/page.tsx index 96232932..894bf5c0 100644 --- a/apps/ai-hero/src/app/(content)/[post]/page.tsx +++ b/apps/ai-hero/src/app/(content)/[post]/page.tsx @@ -120,7 +120,7 @@ async function Post({ post }: { post: Post | null }) { }) return ( -
+
{content}
) diff --git a/apps/ai-hero/src/components/codehike/code.tsx b/apps/ai-hero/src/components/codehike/code.tsx index 6901bdd6..05debcef 100644 --- a/apps/ai-hero/src/components/codehike/code.tsx +++ b/apps/ai-hero/src/components/codehike/code.tsx @@ -1,16 +1,40 @@ import React from 'react' import { highlight, Pre, RawCode } from 'codehike/code' +import { cn } from '@coursebuilder/ui/utils/cn' + +import { CopyButton } from './copy-button' import { callout, diff, focus, fold, link, mark } from './handlers' export async function Code({ codeblock }: { codeblock: RawCode }) { const highlighted = await highlight(codeblock, 'github-dark') + const isTerminalCode = highlighted.lang === 'shellscript' return ( -
+		
+ {isTerminalCode && ( +