Skip to content

String literal escape sequences are not decoded #10

Open

Description

@tangentstorm

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.

Activity

  1. added
    follow-upFiled from a review finding or neighboring case that belongs in its own change.
    on Oct 29, 2026
  2. moved this to Backlog in implishon Oct 29, 2026
  3. added
    approvedThe human approved the issue. Workers start only on approved issues.
    on Oct 29, 2026
  4. moved this from Backlog to Pending in implishon Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedThe human approved the issue. Workers start only on approved issues.follow-upFiled from a review finding or neighboring case that belongs in its own change.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions