`md2xml` fails on ` ` entities returned by the GitLab Markdown API (non-breaking spaces in source)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- documentation
Hướng nghiên cứu
Start in docmaker.GitLab/md2xml, where the issue’s stack trace shows parser.parseString receives the GitLab Markdown API HTML and fails on . Read the conversion path around that call and check how the XML parser handles HTML entities. Done means converting Markdown containing U+00A0 succeeds without requiring source files to replace it with regular spaces.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
If the Markdown contains a non-breaking space (U+00A0), the GitLab Markdown API returns it as . md2xml then parses that HTML with matlab.io.xml.dom.Parser, which only recognizes XML's built-in entities, so parsing fails.
Reproduction Steps:
>> f = websave(fullfile(tempdir, "MATLAB_DocMaker.mltbx"), ...
"https://github.com/mathworks/docmaker/releases/download/v0.8.0/MATLAB_DocMaker.mltbx");
>> matlab.addons.install(f);
>> setenv("DOCMAKER_CONVERTER", "GitLab") % with GitLab token configured
>> setenv("DOCMAKER_GITLAB_HOSTNAME", "gitlab.mathworks.com")
>> docmaker.converter().md2xml("a" + char(160) + "b")
Error using matlab.io.xml.dom.Parser/parseString
Unable to parse string: "<div><p data-sourcepos="1:1-1:4" dir="auto">a b</p></div>". Reason: entity 'nbsp' not found.
Error in docmaker.GitLab/md2xml (line 92)
doc = parser.parseString( "<div>" + xml + "</div>" );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Current Workaround:
Replace U+00A0 with regular spaces in the .md sources before converting.
- Ngôn ngữ chính
- MATLAB
- Star
- 10
- Fork
- 3
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọ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 mathworks/docmaker
-
Provide a docinit functionaliyCó thể làm lại được @k-deeley đã nhận 42 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 59/100
-
No local converter optionCó thể đã có người làm @k-deeley đã nhận 13 ngày trước. Đang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
-
Token bug in converter.mCó thể đã có người làm @k-deeley đã nhận 20 ngày trước. Đang mởbug
Tất cả issue của mathworks/docmaker
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 69/100
UniprJRC/DSwithMATLAB#232 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
windows clang 20 warnings buildĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
wissem01chiha/slxio#51 ·
-
census digest: print a denominator for EDGE-FAMILY CARDINALITY VIOLATIONS (did-schema OPEN_WORK #79)Đang mởV2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
VH-Lab/DID-matlab#399 ·
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 78/100
VH-Lab/NDI-matlab#1183 ·
Maintainer thường phản hồi trong vòng 1 ngày