Misleading error message for improper MATLAB code sections
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- matlab
- Ambito
- documentation
Direzione di ricerca
Inizia riproducendo la sezione di codice MATLAB malformata con docerrun, quindi esamina i punti di ingresso segnalati docerrun>runDiv (riga 159), docerrun>run (riga 109) e docerrun (riga 44). Determina se MATLAB:m_illegal_character può essere identificato in modo affidabile e se il messaggio risultante debba distinguere una sezione di codice chiusa in modo errato. L’attività è completata quando sono disponibili una modifica concordata alla gestione degli errori e la copertura per questo input.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
If you don't close a MATLAB code section properly, e.g. this: bug.md, where I have copy-pasted the matlab flag at the end of the section, you get this message when executing docerrun.
Warning: Error: Invalid text character. Check for unsupported symbol, invisible
character, or pasting of non-ASCII characters.
> In docerrun>runDiv (line 159)
In docerrun>run (line 109)
In docerrun (line 44)
```If you don't close a MATLAB code section properly, e.g. this: [bug.md](https://github.com/-/project/14868/uploads/36f0ed842b4138a86fb03ac4f38cc795/bug.md), where I have copy-pasted the matlab flag at the end of the section, you get this message when executing docerrun.
Warning: Error: Invalid text character. Check for unsupported symbol, invisible
character, or pasting of non-ASCII characters.
> In docerrun>runDiv (line 159)
In docerrun>run (line 109)
In docerrun (line 44)
This lead me hunting for non-ASCII characters, until I eventually spotted the syntax error.
MATLAB treats the bad close as part of the expression to be evaluated. That is what leads to the error message.
>> ```matlab
```matlab
↑
Error: Invalid text character. Check for unsupported symbol, invisible character, or
pasting of non-ASCII characters.
GitHub automatically closes the unclosed Markdown to yield valid HTML. That is beyond my control. I don't want to get into client-side parsing of Markdown to double check.
Given the resulting HTML, the error message is reasonable, if not particularly clear.
The best I could do would be to augment MATLAB errors with identifier MATLAB:m_illegal_character in docerrun. This supposes that a common type of error is to incorrectly close a code block; I'm not sure that it is.
There's a related discussion at: https://talk.commonmark.org/t/insist-that-code-fenced-blocks-are-properly-closed/232/2
- 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 già presa @k-deeley l’ha presa 11 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Update from .prj/xml to matlab.tomlForse già presa @k-deeley l’ha presa 8 giorni fa. Aperta
-
Release notes for version v0.8Forse già presa @k-deeley l’ha presa 25 giorni fa. Aperta
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di mathworks/docmaker
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mathworks/MATLAB-extension-for-vscode#354 · 2 commenti · 1 reazione ·
-
curation
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
SysBioChalmers/yeast-GEM#419 ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
catalystneuro/zarr-matlab#29 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100