Skip to content

[V1.4.6] Auto-linked URL swallows any non-space characters directly after it (most visible with CJK text) #550

Backlog

Description

@Koyukopan

Description:
In the chat UI, an auto-linked URL keeps extending over any characters that follow it without a space. With Japanese text, which usually has no spaces, a full-width closing parenthesis and the whole following sentence become part of the link.

Steps to reproduce:

  1. Have the agent send a message such as:
    日記アプリ、開いたよ(http://127.0.0.1:3110/)。もし画面が出てなかったら、ブラウザの既存タブを見てみてね。
  2. Look at the rendered message.

Expected:
Only http://127.0.0.1:3110/ is linked.

Actual:
The link color and underline start before http and continue through )。もし画面が出てなかったら、ブラウザの既存タブを見てみてね。 (screenshot attached). Clicking it would likely open a malformed URL.

Possible cause (from reading the source, not verified in the running app):
MarkdownContent.tsx renders messages with react-markdown + remark-gfm and has no custom link handling. GFM autolink literals continue until whitespace or <, and trailing ASCII punctuation such as . , ) is trimmed, but full-width punctuation like ) and 。 is not. This should affect any text that follows a URL without a space, not only Japanese.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions