Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/shared/SourceView-codemirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ function _languageExtForPath(
) {
return cpp();
}
return [];

// Fallback to JavaScript highlighting. Inline scripts share the page URL, so
// their path won't have a .js extension. This may be incorrect for
// unknown/unsupported file types, but is the best guess for the common case.
return javascript();
}

// Adjustments to make a CodeMirror editor work as a non-editable code viewer.
Expand Down
Loading