File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ function createGrammarFactory (): CGTMGrammarFactory {
1111 const parsedGrammars = ( rawGrammars as unknown as Omit < monaco . extra . ITMSyntaxExtensionPoint , 'path' > [ ] )
1212 . map ( grammar => ( {
1313 ...monaco . extra . parseTextMateGrammar ( grammar as monaco . extra . ITMSyntaxExtensionPoint , languageService ) ,
14- location : monaco . Uri . file ( grammar . scopeName + '.json' )
14+ location : monaco . Uri . from ( {
15+ scheme : 'browser' ,
16+ path : grammar . scopeName + '.json'
17+ } )
1518 } ) )
1619
1720 return new CGTMGrammarFactory (
Original file line number Diff line number Diff line change @@ -54,7 +54,11 @@ export async function defineVSCodeTheme (
5454 extensionData ?: Partial < monaco . extra . ExtensionData >
5555) : Promise < void > {
5656 const path = `/theme-${ id } .json`
57- const rootUri = monaco . Uri . file ( themeExtensionPoint ?. path ?. slice ( 1 ) ?? path )
57+ // Do not use `file` scheme or monaco will replace `/` by `\` on windows
58+ const rootUri = monaco . Uri . from ( {
59+ scheme : 'browser' ,
60+ path : themeExtensionPoint ?. path ?. slice ( 1 ) ?? path
61+ } )
5862 const themeData = monaco . extra . ColorThemeData . fromExtensionTheme ( {
5963 id,
6064 path : path ,
You can’t perform that action at this time.
0 commit comments