refactor(src): remove redundant coloring from createCodeFrame() (#3049)

`src/runtime/server/preact_hooks.tsx` is the only place that
`createCodeFrame()` is used which stripped the ANSI codes anyway.
This commit is contained in:
Asher Gomez
2025-06-18 10:43:56 +02:00
committed by GitHub
parent 85d22e0bb0
commit 682368ba30
2 changed files with 5 additions and 10 deletions
+1 -2
View File
@@ -29,7 +29,6 @@ import {
DEV_ERROR_OVERLAY_URL,
PARTIAL_SEARCH_PARAM,
} from "../../constants.ts";
import * as colors from "@std/fmt/colors";
import { escape as escapeHtml } from "@std/html";
import { HttpError } from "../../error.ts";
import { getCodeFrame } from "../../dev/middlewares/error_overlay/code_frame.tsx";
@@ -527,7 +526,7 @@ export function ShowErrorOverlay() {
searchParams.append("stack", error.stack);
const codeFrame = getCodeFrame(error.stack, ctx.config.root);
if (codeFrame !== undefined) {
searchParams.append("code-frame", colors.stripAnsiCode(codeFrame));
searchParams.append("code-frame", codeFrame);
}
}
} else {