google / google/CodeCity

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

Open
#449 0 comments 0 reactions 0 assignees View on GitHub
/code
Dominant language
JavaScript
Stars
198
Forks
38
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.