Skip to content

Conversation

@yutannihilation
Copy link
Contributor

Fix #335

For some reason, HTML escaping doesn't work. If we use { (current), it will be displayed as {. If we use {, we get an unexpected token error from Svelte. After struggling for a while, the only solution I could find is to replace it with {'{'}, a Svelte expression that actually returns {.

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 562a653
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/6972c766568b700008be3b81
😎 Deploy Preview https://deploy-preview-337--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gka
Copy link
Contributor

gka commented Jan 22, 2026

perfect thanks! can you run pnpm run format once and commit the changes so the linting succeeds?

@yutannihilation
Copy link
Contributor Author

Thanks for the hint, actually I forgot to run it, but it seems the cause is some temporary error from the GitHub API.

RequestError [HttpError]: Resource not accessible by integration
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:9537:21
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:36187:16), <anonymous>:25:1)
    at async main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:36285:20) {
  status: 403,
  response: {
    url: 'https://api.github.com/repos/svelteplot/svelteplot/issues/337/comments',
    status: 403,
    headers: {
      'access-control-allow-origin': '*',
      'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
      'content-encoding': 'gzip',
      'content-security-policy': "default-src 'none'",
      'content-type': 'application/json; charset=utf-8',
      date: 'Thu, 22 Jan 2026 00:36:33 GMT',
      'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
      server: 'github.com',
      'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
      'transfer-encoding': 'chunked',
      vary: 'Accept-Encoding, Accept, X-Requested-With',
      'x-accepted-github-permissions': 'issues=write; pull_requests=write',
      'x-content-type-options': 'nosniff',
      'x-frame-options': 'deny',
      'x-github-api-version-selected': '2022-11-28',
      'x-github-media-type': 'github.v3; format=json',
      'x-github-request-id': '8800:31BD01:B273D3:B5E9EF:69717110',
      'x-ratelimit-limit': '5000',
      'x-ratelimit-remaining': '4999',
      'x-ratelimit-reset': '1769045793',
      'x-ratelimit-resource': 'core',
      'x-ratelimit-used': '1',
      'x-xss-protection': '0'
    },
    data: {
      message: 'Resource not accessible by integration',
      documentation_url: 'https://docs.github.com/rest/issues/comments#create-an-issue-comment',
      status: '403'
    }
  },
  request: {
    method: 'POST',
    url: 'https://api.github.com/repos/svelteplot/svelteplot/issues/337/comments',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'actions/github-script octokit-core.js/5.0.1 Node.js/20.19.6 (linux; x64)',
      authorization: 'token [REDACTED]',
      'content-type': 'application/json; charset=utf-8'
    },
    body: '{"body":"**TypeScript error report:**\\n- This branch: 855\\n- main branch: 1115\\n- Difference (PR - main): -260 🎉\\n\\n**Svelte TypeScript error report:**\\n- This branch: 2137\\n- main branch: 2137\\n- Difference (PR - main): 0 ℹ️"}',
    request: {
      agent: [Agent],
      fetch: [Function: proxyFetch],
      hook: [Function: bound bound register]
    }
  }
}

@yutannihilation
Copy link
Contributor Author

Hmm, the same error... I have no idea, but I believe there's no lint error. If I run pnpm run format, there's no diff, and pnpm run lint succeeds without any errors on my local.

@gka
Copy link
Contributor

gka commented Jan 23, 2026

ah, I got it. not your fault then. will merge. thanks again!

@gka gka merged commit 659c299 into svelteplot:main Jan 23, 2026
7 of 8 checks passed
@yutannihilation
Copy link
Contributor Author

Thanks for merging!

@yutannihilation yutannihilation deleted the fix/api-doc-curly-brace-escape branch January 23, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API Reference: Curly braces {} are incorrectly escaped to HTML entities

2 participants