• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / frontend / 35235495741
46%

Build:
DEFAULT BRANCH: master
Ran 17 Sep 2026 02:47PM UTC
Jobs 1
Files 475
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Sep 2026 02:43PM UTC coverage: 45.837% (+0.004%) from 45.833%
35235495741

push

github

web-flow
fix(sicp): syntax-highlight SICPy code snippets as Python, not JavaScript (#4382)

* fix(sicp): syntax-highlight SICPy code snippets as Python, not JavaScript

CodeSnippet.tsx hardcoded language="javascript" for every rendered
snippet, and ParseJson.tsx's parseArr/parseObj/processingFunctions had
no notion of which edition (SICP JS vs. SICPy) they were parsing, so
this was never plumbed through for the Python edition either. Every
SICPy code snippet was tokenized as JavaScript, so keywords with no JS
equivalent (def, nonlocal, elif, lambda, ...) were never highlighted,
while overlapping keywords (if/else/return/class/...) looked fine by
coincidence, masking the bug for most snippets.

- Thread a SnippetLanguage ('javascript' | 'python') parameter through
  parseArr/parseObj/processingFunctions/handle* down to CodeSnippet,
  defaulting to 'javascript' so the JS edition (and existing tests)
  are unaffected.
- useSicPySectionQuery now passes 'python'.
- CodeSnippet takes an optional `language` prop (default 'javascript')
  instead of hardcoding it, and forwards it to react-syntax-highlighter.
- Register the 'python' PrismLight grammar in src/index.tsx alongside
  the existing 'javascript' one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* fix(sicp): apply Python highlighting to disabled snippets, destructure CodeSnippet props

- Disabled-eval SICPy snippets (eval: false) rendered through a plain
  Blueprint Pre and never received the language prop, so they stayed
  unhighlighted even after Python support was wired in. Render them
  through the same PrismLight/SourceTheme path as evaluated snippets.
- Destructure CodeSnippetProps in the function parameter instead of
  the function body, per this repo's coding guidelines.

Addresses CodeRabbit review comments on PR #4382.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

3167 of 7884 branches covered (40.17%)

Branch coverage included in aggregate %.

31 of 32 new or added lines in 1 file covered. (96.88%)

7173 of 14674 relevant lines covered (48.88%)

31.56 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.98
0.09% src/features/sicp/parser/ParseJson.tsx
Jobs
ID Job ID Ran Files Coverage
1 35235495741.1 17 Sep 2026 02:47PM UTC 475
45.84
GitHub Action Run
Source Files on build 35235495741
  • Tree
  • List 475
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 5ddf2e7c on github
  • Prev Build on master (#35233472003)
  • Next Build on master (#35504378999)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc