Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulator crashes when entering quote in UI editor #1427

Closed
Mrtenz opened this issue May 24, 2023 · 2 comments · Fixed by #1709
Closed

Simulator crashes when entering quote in UI editor #1427

Mrtenz opened this issue May 24, 2023 · 2 comments · Fixed by #1709
Assignees
Labels
area-snaps-simulator type-bug Something isn't working

Comments

@Mrtenz
Copy link
Member

Mrtenz commented May 24, 2023

Since the UI code editor is running a VSCode-based editor with proper TypeScript type checking, the following error occurs when entering a quote (and potentially other characters) in the UI editor.

SyntaxError: Unterminated string literal. (5:20)
  3 |
  4 |       const component = panel([
> 5 | heading('Heading'')
    |                    ^
  6 | ]);
  7 |

This can be solved by catching and ignoring these errors.

@Mrtenz Mrtenz added type-bug Something isn't working area-snaps-simulator labels May 24, 2023
@Mrtenz Mrtenz self-assigned this May 24, 2023
@FrederikBolding
Copy link
Member

@Mrtenz Should we just be escaping? Ideally we wouldn't be producing invalid code 🤔

@kenhkan
Copy link

kenhkan commented May 25, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-snaps-simulator type-bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants