[BUG]: Plain text with underscores or asterisks gets formatted as Markdown

Đang mở
#127 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
dart, flutter
Lĩnh vực
mobile

Hướng nghiên cứu

The payload names no files or tests, so start in the Flutter client's message rendering path and find where Markdown is parsed for sent messages. Reproduce by sending a message with an unmatched underscore and a partial Markdown opener, which the report says gets formatted. Done means unclosed or stray markers render as plain text while complete Markdown still formats correctly. The issue has no agreed expected behaviour, so confirm the intended rule with the maintainers before changing the parser.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: mobile bug good first issue

Context

Messages are rendered with MarkdownBody (flutter_markdown_plus). Ordinary text containing _, * or similar is sometimes treated as Markdown, e.g. snake_case_names, 2*3*4, or a lone _ at the start, so it shows up oddly formatted or with characters missing.

Steps to reproduce

  1. Send my_file_name and other_file_name.
  2. Send 2*3*4 = 24.
  3. Send _not closed.

What to do

  • Find which inputs render incorrectly (add them to a widget test).
  • Fix it, e.g. by restricting the Markdown extensions in use, requiring word boundaries for _ emphasis, or escaping unpaired markers before rendering.
  • Intentional Markdown (**bold**, _italic_, `code`) must still work.

Where to look

mobile/lib/widgets/chat_page_widgets.dart (MarkdownBody around line 228, _markdownStyle).

Ngôn ngữ chính
Dart
Star
9
Fork
5
Merge trung bình
49 phút
Pull request đã merge (30 ngày)
34

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CommandLineCoding/Elephant

Tất cả issue của CommandLineCoding/Elephant

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.