Skip to content

fix: correct syntax highlighting for websocket tutorial Results block#993

Merged
SahilAujla merged 1 commit intomainfrom
fix/websocket-results-syntax-highlighting
Feb 6, 2026
Merged

fix: correct syntax highlighting for websocket tutorial Results block#993
SahilAujla merged 1 commit intomainfrom
fix/websocket-results-syntax-highlighting

Conversation

@SahilAujla
Copy link
Collaborator

@SahilAujla SahilAujla commented Feb 6, 2026

Summary

  • Changed code fence language from json to javascript for the second "Results" code block in the websocket pending transactions tutorial
  • The block contains JS object notation (unquoted keys, single-quoted strings), not JSON — the json grammar can't tokenize single-quoted strings, causing fragmented/glitchy highlighting of hex values

@SahilAujla SahilAujla requested a review from a team as a code owner February 6, 2026 17:51
Copilot AI review requested due to automatic review settings February 6, 2026 17:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects syntax highlighting in the WebSocket pending transactions tutorial by changing the code fence language for a “Results” block to match the actual content (JavaScript object literal, not JSON).

Changes:

  • Updated the “Results” code fence language from json to javascript to avoid broken highlighting for single-quoted strings and unquoted keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Feb 6, 2026, 6:06 PM

@github-actions github-actions bot temporarily deployed to docs-preview February 6, 2026 17:52 Destroyed
Copy link
Collaborator

@dslovinsky dslovinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but it IS json, just broken because:

  1. multiple objects not wrapped in an array
  2. .... on line 238.
    Fixing those should also work, but nbd either way

The second Results code block used JS object notation (unquoted keys,
single-quoted strings) with a json language tag, causing broken syntax
highlighting. Converted to valid JSON: double-quoted keys/strings,
wrapped in an array, removed trailing `....`, and truncated the long
input field for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@SahilAujla SahilAujla force-pushed the fix/websocket-results-syntax-highlighting branch from 88acf29 to 2ad9b09 Compare February 6, 2026 18:03
@github-actions github-actions bot temporarily deployed to docs-preview February 6, 2026 18:04 Destroyed
@SahilAujla SahilAujla merged commit 7f984ac into main Feb 6, 2026
8 of 9 checks passed
@SahilAujla SahilAujla deleted the fix/websocket-results-syntax-highlighting branch February 6, 2026 18:10
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.

2 participants