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: two hard breaks in a row become a paragraph break

Đang mở
#213 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/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
Lĩnh vực
cli

Hướng nghiên cứu

Start with the named renderInlineRun, renderMark, renderCellLines, and heading substitutions, then reproduce the two-consecutive-break examples on main. Ensure later breaks in a run use the backslash-plus-newline spelling consistently, including marked, cell, and heading cases, so publishing keeps one paragraph and preserves both breaks.

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

Mô tả

Two hard breaks in a row read back as a paragraph break. Found while working on #204; reproduced on main:

storage read writes publish sends
<p>a<br /><br />b</p> a␣␣\n␣␣\nb <p>a</p><p>b</p>

The second break's own two spaces make a line that holds nothing but whitespace, and Markdown reads that as a blank line, so one paragraph comes back as two. The editor writes this shape for Shift+Enter pressed twice.

Since #204 the same happens when a <br /> at the end of a bold run is followed by a <br /> (<p><strong>a<br /></strong><br />b</p>), because the edge break now moves out of the mark instead of being dropped.

Notes

  • A backslash hard break survives on a line of its own: a␣␣\n\\\nb publishes as <p>a<br />\n<br />\nb</p>. So the fix is probably to write every break after the first in a run as \ + newline.
  • Breaks are compared and trimmed as the literal " \n" in several places (renderInlineRun, renderMark's edge trim, renderCellLines' <br> substitution, the heading's <br /> substitution), so each place needs to recognise the second spelling too. Otherwise a mark's edge trim stops at the backslash.
Ngôn ngữ chính
Go
Star
2
Fork
0
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.