-
-
Couldn't load subscription status.
- Fork 5k
Closed
Description
I have my modes compiled with shasums attached that way I can serve them as immutbale resources (so for example /javascript/javascript-sha256-23958394893040blahblah). This makes the current replacement-based modeURL system difficult to use for dynamically loading modes. I actually currently get away with passing in a fake string object that has a replace method:
CodeMirror.modeURL = { replace: (_, mode) => lookupComplexURLForMode(mode) };While this works today, it is certainly not ideal as I have to rely on knowledge that replace() gets called. Having modeURL accept a function, or a separate URLForMode option for a callback that returns the URL given a mode would make my code more future-proof.
Metadata
Metadata
Assignees
Labels
No labels