Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

read: a bold or italic span starting or ending with punctuation reads back as literal asterisks

Đang mở
#216 0 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, markdown
Lĩnh vực
cli, content

Hướng nghiên cứu

Start with the table property test mentioned in the issue and trace the read/write and publish conversion paths for marked spans. Reproduce the punctuation cases against the current goldmark-based behavior, then compare the relevant handling with CommonMark's flanking rules. Done means spans such as (b) next to letters no longer round-trip or publish with literal asterisks.

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

Mô tả

A bold, italic or strikethrough span whose text starts or ends with punctuation, with a letter or digit just outside it, reads back as literal asterisks. Reproduced on main:

storage read writes publish sends
<p>a<strong>(b)</strong>c</p> a**(b)**c <p>a**(b)**c</p>
<p><strong>&amp;copy;</strong>a</p> **\&copy;**a (since #203) literal asterisks

CommonMark's flanking rule has two halves. The whitespace half (a delimiter next to whitespace on the wrong side does not open or close) was fixed for marks in #204. The punctuation half remains: a closing ** preceded by punctuation closes only if it is followed by whitespace or punctuation, and an opening ** followed by punctuation opens only if it is preceded by whitespace or punctuation. So **(b)**c does not close, and the whole span publishes as text with its asterisks.

Escaping cannot fix it, since the punctuation is the span's own text. Possible fixes:

  • Write such a span as inline HTML (<strong>(b)</strong>), which goldmark passes through and the forward converter already accepts.
  • Use the _ delimiter where it helps. It has stricter intraword rules, so it is probably not a general answer.

Found while working on #203; the table property test's generator now keeps a mark's text from starting or ending with punctuation to avoid it.

Ngôn ngữ chính
Go
Star
4
Fork
1
Merge trung bình
2 giờ 31 phút
Pull request đã merge (30 ngày)
59

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

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 mozilla/markfluence

Tất cả issue của mozilla/markfluence

Issue tương tự

Thêm issue về Go

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.