{children}
; 75 | }, 76 | a({ children, href, ...props }) { 77 | const childrenArray = React.Children.toArray(children); 78 | const childrenText = childrenArray 79 | .map((child) => child?.toString() ?? "") 80 | .join(""); 81 | 82 | const cleanedText = childrenText.replace(/\[|\]/g, ""); 83 | const isNumber = /^\d+$/.test(cleanedText); 84 | 85 | return isNumber ? ( 86 | 93 | {children} 94 | 95 | ) : ( 96 | 103 | {children} 104 | 105 | ); 106 | }, 107 | ol({ children }) { 108 | return
147 | {childArray}
148 |
149 | );
150 | }
151 | return (
152 | by {article.author}
41 |42 | {article.description} 43 |
44 |161 | {body} 162 |
163 | ) 164 | }) 165 | FormMessage.displayName = "FormMessage" 166 | 167 | export { 168 | useFormField, 169 | Form, 170 | FormItem, 171 | FormLabel, 172 | FormControl, 173 | FormDescription, 174 | FormMessage, 175 | FormField, 176 | } 177 | -------------------------------------------------------------------------------- /src/components/ui/hover-card.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as HoverCardPrimitive from "@radix-ui/react-hover-card" 5 | 6 | import { cn } from "@/lib/utils" 7 | 8 | const HoverCard = HoverCardPrimitive.Root 9 | 10 | const HoverCardTrigger = HoverCardPrimitive.Trigger 11 | 12 | const HoverCardContent = React.forwardRef< 13 | React.ElementRef