mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Fix freezing browser if syntax highlighting large files (#2010)
We unified syntax highlighting and extracted it into a low level module. Syntax highlighting from now on takes place in a web worker, so that the user interface stays responsive. The web worker stops automatically if the number of nodes which should be highlighted exceeds the defined limit we believe the browser can handle. Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com> Co-authored-by: Konstantin Schaper <konstantin.schaper@cloudogu.com>
This commit is contained in:
committed by
GitHub
parent
0e930b8671
commit
a0737a2c90
@@ -41,7 +41,7 @@ const createApiKey =
|
||||
throw new Error("Server does not return required Location header");
|
||||
}
|
||||
const locationResponse = await apiClient.get(location);
|
||||
const [apiKey, token] = await Promise.all<ApiKey, string>([locationResponse.json(), creationResponse.text()]);
|
||||
const [apiKey, token] = await Promise.all([locationResponse.json(), creationResponse.text()]);
|
||||
return { ...apiKey, token } as ApiKeyWithToken;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user