ttcMD: made card (regrettably) nestable to allow them in code blocks inside of cards

This commit is contained in:
2024-03-13 00:30:59 -06:00
parent 23cf8c263d
commit 009e988a38
4 changed files with 90 additions and 56 deletions

View File

@@ -14,9 +14,7 @@ export const TTCMD: FC<{ body: Promise<string> }> = ({ body }) => {
const text = use(body);
const [elements, tabSpacing] = useMemo(() => createElements(text), [text]);
const tada = useMemo(
() => (
<>{renderer(elements.filter((e) => !e.parent).map((e) => e.token!))}</>
),
() => <>{renderer(elements.map((e) => e.token))}</>,
[elements],
);
return (