String literal escape sequences are not decoded

Offen
#10 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

@tangentstorm arbeitet bereits daran.

Seit 29.10.2026.

  • #14 von @tangentstorm — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
30/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
typescript
Bereich
compilers

Rechercherichtung

Start at imp-load.mts:122, where string values are constructed, and check the documented supported escapes. The issue says open PR #14 is linked, so coordinate before starting; done means escaped strings decode correctly and loading and showing a string preserves its value without accumulating backslashes.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

approved follow-up

From the Codex whole-repo review on #5 (review comment).

Location: imp-load.mts:122 on main (6813323)

[P2] Decode escape sequences when constructing string values

For strings containing escapes, this handler only removes the surrounding quotes and retains the escape characters literally. Thus "a\nb" contains a backslash and n rather than a newline, and an escaped quote retains its backslash. This contradicts the documented string syntax and also breaks serialization: impShow uses JSON.stringify, so loading and showing a string repeatedly adds more backslashes. Decode the supported escapes before constructing the string value so printed strings can be read back unchanged.

Checked 2026-10-29: still present on main; not touched by open PRs #3, #4 or #7.

Vorherrschende Sprache
TypeScript
Sterne
6
Forks
1
Ø Merge
3 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus tangentcode/implish

Alle Issues in tangentcode/implish

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

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