PlaceMarkersUsfmUpdateBlockHandler gets confused with table cells
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
- 62/100
Hướng nghiên cứu
Start with the UpdateUsfm_TableCells test and the PlaceMarkersUsfmUpdateBlockHandler it uses, and run the test to see the output. The bug is that table-cell markers such as \tc1 get moved to the end of the row and \tr rows lose their cell markers. Done means the test's target USFM matches the input USFM exactly, with the existing PlaceMarkers tests still passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The SF test team has noticed an issue where tables of a reasonably long length were getting garbled and out of order, both in normal builds and to a lesser degree (but still occurring) in echo builds. This particularly occurred with the SNHB DBL resource, which has a table in Numbers 1. The NLT does this too, but places verse markers in the table cells, which may alter the behavior of this bug.
The following test recreates the bug:
[Test]
public void UpdateUsfm_TableCells()
{
string source = "One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen " +
"Sixteen Seventeen Eighteen Nineteen";
var alignInfo = new PlaceMarkersAlignmentInfo(
sourceTokens: [.. Tokenizer.Tokenize(source)],
translationTokens: [.. Tokenizer.Tokenize(source)],
alignment: ToWordAlignmentMatrix(
"0-0 1-1 2-2 3-3 4-4 5-5 6-6 7-7 8-8 9-9 10-10 11-11 12-12 13-13 14-14 15-15 16-16 17-17 18-18"
),
paragraphBehavior: UpdateUsfmMarkerBehavior.Preserve,
styleBehavior: UpdateUsfmMarkerBehavior.Strip
);
IReadOnlyList<UpdateUsfmRow> rows =
[
new UpdateUsfmRow(
ScrRef("MAT 1:1"),
source,
new Dictionary<string, object> { { "alignment_info", alignInfo } }
),
];
string usfm =
@"\id MAT
\c 1
\v 1 One
\tr \th1 Two \th2 Three
\tr \tc1 Four \tc2 Five
\tr \tc1 Six \tc2 Seven
\tr \tc1 Eight \tc2 Nine
\tr \tc1 Ten \tc2 Eleven
\tr \th1 Twelve \th2 Thirteen
\tr \tc1 Fourteen \tc2 Fifteen
\tr \tc1 Sixteen \tc2 Seventeen
\tr \tc1 Eighteen \tc2 Nineteen
";
string target = UpdateUsfm(
rows,
usfm,
paragraphBehavior: UpdateUsfmMarkerBehavior.Preserve,
usfmUpdateBlockHandlers: [new PlaceMarkersUsfmUpdateBlockHandler()]
);
AssertUsfmEquals(target, usfm);
}
The target USFM created by this test is:
\id MAT
\c 1
\v 1 One
\tr \th1 Two \th2 Three
\tr \tc1 Four \tc2 Five
\tr \tc1 Six \tc2 Seven
\tr \tc1 Eight \tc2 Nine \tc1
\tr Ten \tc2 Eleven
\tr \th1 Twelve \th2 Thirteen
\tr \tc1 Fourteen \tc2 Fifteen
\tr \tc1 Sixteen \tc2 Seventeen \tc1
\tr Eighteen \tc2 Nineteen
- Ngôn ngữ chính
- C#
- Star
- 29
- Fork
- 16
- Merge trung bình
- 5 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sillsdev/machine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sillsdev/machine
Issue tương tự
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nocturne#3243 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
dasher-project/Dasher-Windows#84 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
libnativeapi/nativeapi#21 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 3 ngày
-
enhancement P3 performance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
thomhurst/TUnit#7380 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày