Title: escape all non-printable or non-ASCII characters in strings · Issue #1265 · purescript/purescript · GitHub
Open Graph Title: escape all non-printable or non-ASCII characters in strings · Issue #1265 · purescript/purescript
X Title: escape all non-printable or non-ASCII characters in strings · Issue #1265 · purescript/purescript
Description: I ran into this error. $ cat test.purs module Main where string = "\x1B" $ psc test.purs Compiling Main Writing output/Main/index.js Writing output/Main/externs.purs $ psc-bundle 'output/**/*.js' The module could not be parsed. $ cat out...
Open Graph Description: I ran into this error. $ cat test.purs module Main where string = "\x1B" $ psc test.purs Compiling Main Writing output/Main/index.js Writing output/Main/externs.purs $ psc-bundle 'output/**/*.js' T...
X Description: I ran into this error. $ cat test.purs module Main where string = "\x1B" $ psc test.purs Compiling Main Writing output/Main/index.js Writing output/Main/externs.purs $ psc-bundle 'out...
Opengraph URL: https://github.com/purescript/purescript/issues/1265
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"escape all non-printable or non-ASCII characters in strings","articleBody":"I ran into this error.\n\n```\n$ cat test.purs\nmodule Main where\nstring = \"\\x1B\"\n```\n\n```\n$ psc test.purs\nCompiling Main\nWriting output/Main/index.js\nWriting output/Main/externs.purs\n```\n\n```\n$ psc-bundle 'output/**/*.js'\nThe module could not be parsed.\n```\n\n```\n$ cat output/Main/index.js\n// Generated by psc version 0.7.1.0\n\"use strict\";\nvar string = \";\nmodule.exports = {\n string: string\n};\n```\n\nThe error from psc-bundle occurs because a literal `\\x1B` character is printed in the string. This is legal JavaScript, but the library we're using to parse it doesn't seem to handle it properly. I'm sure there is also poor support for unicode in this and other JavaScript tooling. We should use escape sequences for all but the simplest set of characters: printable ASCII.\n","author":{"url":"https://github.com/michaelficarra","@type":"Person","name":"michaelficarra"},"datePublished":"2015-07-15T02:14:19Z","url":"https://github.com/purescript/purescript/issues/1265"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e90a31c1-e8a2-aa06-5e3b-81e5dade4270 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3FE:4E2A2:1898BB:227013:6AFB6CF0 |
| html-safe-nonce | c1309877dec4ee55b7a415302eb08f3f92208e8d8f270bc30b23e1829e6aab99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0ZFOjRFMkEyOjE4OThCQjoyMjcwMTM6NkFGQjZDRjAiLCJ2aXNpdG9yX2lkIjoiNzg3Njc2MzgyOTg2ODkxNTk1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b51cb9db7b3fa4c0ffb7db3dc63c78dabec5b4cc47dd77b4f2268eb36f7a9254 |
| hovercard-subject-tag | issue:95087213 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript/purescript/1265/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04e57240966708843f1a10912b1cb7f546492058a035264d8e0eaadc3c7af4f5/purescript/purescript/issues/1265 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04e57240966708843f1a10912b1cb7f546492058a035264d8e0eaadc3c7af4f5/purescript/purescript/issues/1265 |
| og:image:alt | I ran into this error. $ cat test.purs module Main where string = "\x1B" $ psc test.purs Compiling Main Writing output/Main/index.js Writing output/Main/externs.purs $ psc-bundle 'output/**/*.js' T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | michaelficarra |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript/purescript git https://github.com/purescript/purescript.git |
| octolytics-dimension-user_id | 6556677 |
| octolytics-dimension-user_login | purescript |
| octolytics-dimension-repository_id | 13206906 |
| octolytics-dimension-repository_nwo | purescript/purescript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13206906 |
| octolytics-dimension-repository_network_root_nwo | purescript/purescript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width