`md2xml` fails on ` ` entities returned by the GitLab Markdown API (non-breaking spaces in source)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- documentation
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- MATLAB
- Sterne
- 10
- Forks
- 3
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus mathworks/docmaker
-
Provide a docinit functionaliyEvtl. wieder frei @k-deeley hat das vor 42 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 59/100
-
No local converter optionEvtl. vergeben @k-deeley hat das vor 13 Tagen übernommen. Offenenhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
-
Token bug in converter.mEvtl. vergeben @k-deeley hat das vor 20 Tagen übernommen. Offenbug
Alle Issues in mathworks/docmaker
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 69/100
UniprJRC/DSwithMATLAB#232 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 67/100
wissem01chiha/slxio#51 ·
-
census digest: print a denominator for EDGE-FAMILY CARDINALITY VIOLATIONS (did-schema OPEN_WORK #79)OffenV2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
VH-Lab/DID-matlab#399 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
VH-Lab/NDI-matlab#1183 ·
Maintainer antworten meist innerhalb von 1 Tag