sbarex / SourceCodeSyntaxHighlight

Quick Look extension for highlight source code files on macOS 10.15 and later.
GNU General Public License v3.0
2.88k stars 72 forks source link

Add support for .jsm filename extension #237

Closed JimDanner closed 11 months ago

JimDanner commented 1 year ago

The .jsm filename extension is used for JavaScript Code Modules, i.e. the files contain JavaScript source code; .jsm is an alternative variation of .mjs used by Mozilla applications. I counted 484 jsm files in the Firefox source code, and 429 in the Thunderbird source.

Unfortunately, this filename extension is not in Apple's default list for JavaScript files, so the files don't have the com.netscape.javascript-source UTI used by Syntax Highlight. They have the dynamic UTI dyn.ah62d4rv4ge80y65r. Could this nevertheless be added in, and be parsed by the JavaScript parser?

sbarex commented 11 months ago

Implemented on release 2.2.20.