Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

0.7.7 rejects entity names longer than 10 letters (for example ⁢)

Aperta Adatta ai principianti
#896 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust, xml

Direzione di ricerca

L’issue indica l’espressione regolare HTML_ENTITIES in src/interface.rs e i nomi delle entità in entities.in. Leggi come l’espressione regolare alimenta HTML_ENTITIES_MAPPING, quindi controlla gli esempi elencati, compresi i nomi più lunghi di 10 lettere. Il lavoro è completato quando SetMathML accetta queste entità denominate; l’issue segnala anche una discrepanza separata di GetMathCATVersion() nella DLL di release.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In 0.7.7, SetMathML rejects MathML that uses a named entity longer than ten letters. For example:

<math><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi></math>

SetMathML returns an empty string, and GetError says:

Invalid MathML input: ... XML parsing error at 21: {UnknownNamedReference}

0.7.5 handles the same input. Short names still work (⁢, ⁡, π, →), and so do numeric references. The cut-off is the length of the name: ⅈ (10 letters) works and ⊗ (11 letters) fails.

The cause looks like the HTML_ENTITIES regex in src/interface.rs. In 0.7.0 it was &([a-zA-Z]+?);, and in 0.7.7 it is &([a-zA-Z]{2,10});, so longer names never reach HTML_ENTITIES_MAPPING and the XML parser sees them unresolved. entities.in has 294 names longer than 10 letters, up to CounterClockwiseContourIntegral at 31, so the upper bound needs to be at least 31.

Separately, GetMathCATVersion() in the MathCATForC v0.7.7 release DLL returns "0.7.6-rc.4".

We found this while moving JAWS to 0.7.7, and we work around it on our side for now. Thanks for the release, and for the heads-up about the minimized rules.

Lingua principale
Rust
Stelle
123
Fork
93
Merge medio
5g 11h
PR unite (30g)
48

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di daisy/MathCAT

Tutte le issue di daisy/MathCAT

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.