Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/diffs/src/worker/WorkerPoolManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import type {
} from './types';

const IGNORE_RESPONSE = Symbol('IGNORE_RESPONSE');
const DISABLE_HIGHLIGHTING = true;

class WorkerPoolTerminatedError extends Error {
constructor() {
Expand Down Expand Up @@ -559,6 +560,7 @@ export class WorkerPoolManager {
// attempt to highlight. This should be mostly never hit, but it's just an
// extra level of safety
if (
DISABLE_HIGHLIGHTING ||
isFilePlainText(file) ||
(cachedResult != null &&
areFileRenderOptionsEqual(
Expand All @@ -583,6 +585,7 @@ export class WorkerPoolManager {
const cachedResult = this.getFileResultCache(file);
const highlightKey = this.getFileHighlightKey(file);
if (
DISABLE_HIGHLIGHTING ||
highlightKey == null ||
isFilePlainText(file) ||
(cachedResult != null &&
Expand Down Expand Up @@ -628,6 +631,7 @@ export class WorkerPoolManager {
// attempt to highlight. This should be mostly never hit, but it's just an
// extra level of safety
if (
DISABLE_HIGHLIGHTING ||
isDiffPlainText(diff) ||
(cachedResult != null &&
areDiffRenderOptionsEqual(
Expand All @@ -652,6 +656,7 @@ export class WorkerPoolManager {
const cachedResult = this.getDiffResultCache(diff);
const highlightKey = this.getDiffHighlightKey(diff);
if (
DISABLE_HIGHLIGHTING ||
highlightKey == null ||
isDiffPlainText(diff) ||
(cachedResult != null &&
Expand Down
Loading