mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-08 23:32:36 -05:00
fixes missing font file in monaco-editor (#322735)
This commit is contained in:
committed by
GitHub
parent
830ba74cc2
commit
b99aeda16a
@@ -139,9 +139,9 @@ function transportCSS(module: string, enqueue: (module: string) => void, write:
|
||||
|
||||
function _rewriteOrInlineUrls(contents: string, forceBase64: boolean): string {
|
||||
return _replaceURL(contents, (url) => {
|
||||
const fontMatch = url.match(/^(.*).ttf\?(.*)$/);
|
||||
const fontMatch = url.match(/^(.*)\.ttf(\?.*)?$/);
|
||||
if (fontMatch) {
|
||||
const relativeFontPath = `${fontMatch[1]}.ttf`; // trim the query parameter
|
||||
const relativeFontPath = `${fontMatch[1]}.ttf`; // trim the optional query parameter
|
||||
const fontPath = path.join(path.dirname(module), relativeFontPath);
|
||||
enqueue(fontPath);
|
||||
return relativeFontPath;
|
||||
|
||||
Reference in New Issue
Block a user