From d932cbecfd0c3a6fbe6f47200686055cb8829790 Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Tue, 16 Apr 2024 22:45:45 -0700 Subject: [PATCH 1/2] Ensure correct compiler error styling and strip ANSI escape sequences. The compiler error output that's injected into the page hard-codes a background color of white, but didn't hard-code a corresponding text color. If the page had set a default text color that was too close to white, it would be hard or impossible to read without selecting the text on the page. This change addresses this by hard-coding a text color of black, ensuring it can be read. It also goes a step further and improves the display when dealing with ANSI escape sequences in the error output, making it difficult to read through or copy/paste meaningful results. We now apply a common regex for stripping away any typical ANSI escape sequences we should expect in such output, leaving behind only the plain text content. --- pipeline/templates/pipeline/compile_error.html | 2 +- pipeline/templatetags/pipeline.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pipeline/templates/pipeline/compile_error.html b/pipeline/templates/pipeline/compile_error.html index a3a816e8..84c3ba37 100644 --- a/pipeline/templates/pipeline/compile_error.html +++ b/pipeline/templates/pipeline/compile_error.html @@ -1,5 +1,5 @@