Skip to content

Fallback to javascript highlighting in the source view as a backup#5936

Open
canova wants to merge 1 commit intofirefox-devtools:mainfrom
canova:js-highlight
Open

Fallback to javascript highlighting in the source view as a backup#5936
canova wants to merge 1 commit intofirefox-devtools:mainfrom
canova:js-highlight

Conversation

@canova
Copy link
Copy Markdown
Member

@canova canova commented Apr 2, 2026

This might be a bit controversial as we are now falling abck to javascript highlighting for all the unkown sources. But I feel like it's an okay compomise. The main issue is that inline scripts share the page URL as the file name, and this doesn't include the .js extension, so it's impossible to know if they are indeed JS from the file path. Falling back to javascript for all unkown can have false positives for unkown file types, but I think that's fine.

STR:

@canova canova requested a review from mstange April 2, 2026 16:37
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.45%. Comparing base (c886717) to head (f114574).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/components/shared/SourceView-codemirror.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5936   +/-   ##
=======================================
  Coverage   85.45%   85.45%           
=======================================
  Files         321      321           
  Lines       32139    32139           
  Branches     8850     8764   -86     
=======================================
  Hits        27463    27463           
  Misses       4241     4241           
  Partials      435      435           

☔ 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.

Copy link
Copy Markdown
Contributor

@mstange mstange left a comment

Choose a reason for hiding this comment

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

Seems fine to me.

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