google / google/CodeCity

JSSP, SVG and String editors should accept single-quoted strings

Offen
#449 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
/code
Vorherrschende Sprache
JavaScript
Sterne
198
Forks
38
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I made a modification to `$.utils.code.toSource` to use `$.utils.code.quote` instead of `JSON.stringify` to format strings (`.quote` prefers to use single quotes instead of double-quotes unless it would result in too many `\'`s), and in the process inadvertently broke the JSSP, SVG and String editors because they no longer comprehended the data to be edited.

Obviously I've reverted the change for now, and equally obviously it is a fool's errand to try to make the front ends fully general in what they can accept, but it would be nice for the editors to not be *quite* so dependent on the specifics of how the server chooses to represent the values to be edited.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, $.utils.code.toSource und die JSSP-, SVG- und String-Editoren zu finden, die dessen Ausgabe verarbeiten. Verfolge, wie diese Editoren Zeichenketten in Anführungszeichen parsen, und überprüfe anschließend, dass sie die von $.utils.code.quote erzeugte Darstellung mit einfachen Anführungszeichen akzeptieren, ohne die bestehende Eingabe mit doppelten Anführungszeichen zu beeinträchtigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.