) => (
@@ -84,7 +91,7 @@ const messageMarkdownComponents = {
// ``. Both fall through to v2.css selectors `.v2-msg__content code`
// and `.v2-msg__content pre`. Mentions inside code are NOT transformed.
// Fenced code past six lines collapses (direction C).
- pre: (props: React.HTMLAttributes) => ,
+ pre: ({ node: _node, ...props }: React.HTMLAttributes & { node?: unknown }) => ,
};
interface V2MessageRowProps {
@@ -522,10 +529,7 @@ const V2MessageRow: React.FC = ({ message, sourceMessageId, d
// syntax. Without this, agents posting raw URLs render as plain text and
// the user can't click them.
if (stripped && !externalBareImage) {
- stripped = stripped.replace(
- /(?"]+?[^\s<>".,!?;:])(?=[\s.,!?;:]|$)/g,
- '[$1]($1)',
- );
+ stripped = linkifyBareUrls(stripped);
}
// Highlight messages that @-mention the current user. Word-boundary so