+ {content}
+
+ );
+ })
+ .with({ type: 'heading' }, ({ children, level }) => {
+ return (
+ {inline(children)}
; + }) + .with({ type: 'quote' }, ({ lines }) => { + return ( ++ {lines.map((line, i) => { + return+ ); + }) + .with({ type: 'table' }, ({ header, rows }) => { + const cellCn = 'border border-gray-200 px-2 py-1'; + + return ( +{inline(line)}
; + })} +
| + {inline(cell)} + | + ); + })} +
|---|
| + {inline(cell)} + | + ); + })} +
+ {content}
+
+ );
+ })
+ .with({ type: 'italic' }, ({ content }) => {
+ return {content};
+ })
+ .with({ type: 'link' }, ({ text, url }) => {
+ return (
+
+ {text}
+
+ );
+ })
+ .with({ type: 'math' }, ({ latex }) => {
+ return (
+
+ );
+ })
+ .with({ type: 'ref' }, ({ number }) => {
+ return renderRef(number);
+ })
+ .with({ type: 'text' }, ({ content }) => {
+ return content;
+ })
+ .exhaustive()}
+