Skip to content

fix: expand hljs language coverage via alias resolution#136

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/hljs-language-coverage
Apr 28, 2026
Merged

fix: expand hljs language coverage via alias resolution#136
tomasz-tomczyk merged 1 commit intomainfrom
fix/hljs-language-coverage

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Replace hand-curated extension→language map with hljs.getLanguage() alias resolution + small override map for cases where the extension isn't a registered hljs alias.
  • Adds Gherkin (.feature) and many other languages that were missing despite being bundled in highlight.js.

Related to tomasz-tomczyk/crit#375.

Review

  • Code review: passed
  • Parity audit: paired with tomasz-tomczyk/crit (separate PR)

Test plan

  • Verified hljs.getLanguage('feature') resolves to Gherkin in the bundled hljs build
  • Visually confirmed .feature files render with hljs spans

🤖 Generated with Claude Code

Replace hand-curated extension map with hljs.getLanguage() alias
lookup plus a small overrides map for cases where the file extension
is not a registered hljs alias. Adds Gherkin (.feature) and many
others previously missing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.21%. Comparing base (a9b9a69) to head (a4e0789).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #136   +/-   ##
=======================================
  Coverage   77.21%   77.21%           
=======================================
  Files          52       52           
  Lines        1567     1567           
=======================================
  Hits         1210     1210           
  Misses        357      357           
Flag Coverage Δ
unit 77.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk merged commit be97c3e into main Apr 28, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/hljs-language-coverage branch April 28, 2026 21:06
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.

1 participant