google / google/playground-elements
Use filetypes over mime-types for syntax highlighting
Open
- Dominant language
- TypeScript
- Stars
- 648
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
Non traditional types like `tsx` default to the `application/octect-stream` mime-type. During a fetch (initial load) `tsx` will have a mime-type of `application/octect-stream` and will not have syntax highlights as a consequence.
Currently, we use `mime-types` to infer syntax highlighting. However, servers are less than consistent with `mime-types`.
It is possible to avoid `mime-types` entirely and instead highlight by `file-type`.
Contributor guide
Assessment
This issue has not been assessed yet.