`md2xml` fails on ` ` entities returned by the GitLab Markdown API (non-breaking spaces in source)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- documentation
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- MATLAB
- Stelle
- 10
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mathworks/docmaker
-
Provide a docinit functionaliyForse di nuovo libera @k-deeley l’ha presa 42 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 59/100
-
No local converter optionForse già presa @k-deeley l’ha presa 13 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
-
Token bug in converter.mForse già presa @k-deeley l’ha presa 20 giorni fa. Apertabug
Tutte le issue di mathworks/docmaker
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 69/100
UniprJRC/DSwithMATLAB#232 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
wissem01chiha/slxio#51 ·
-
census digest: print a denominator for EDGE-FAMILY CARDINALITY VIOLATIONS (did-schema OPEN_WORK #79)ApertaV2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VH-Lab/DID-matlab#399 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VH-Lab/NDI-matlab#1183 ·
I maintainer di solito rispondono entro 1 giorno