From 75837bb5953653a184eda92ef9727c96f41a4512 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Sep 2021 14:57:58 +0200 Subject: [PATCH] Respect NO_COLOR in Markdown output --- src/libcmd/markdown.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcmd/markdown.cc b/src/libcmd/markdown.cc index 8a2f155d6..737356284 100644 --- a/src/libcmd/markdown.cc +++ b/src/libcmd/markdown.cc @@ -44,7 +44,7 @@ std::string renderMarkdownToTerminal(std::string_view markdown) if (!rndr_res) throw Error("allocation error while rendering Markdown"); - return std::string(buf->data, buf->size); + return filterANSIEscapes(std::string(buf->data, buf->size), !shouldANSI()); } }