quarto-dev / quarto-dev/quarto-cli

knitr: process ANSI color codes

Open
#5,746 12 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since May 30, 2023.

engines-knitr enhancement
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Colors or R warnings (see 1 in the figure) in Quarto are marked with symbols (see 2, 3). These symbols must not be present.

Steps to reproduce

```{r}
with(airquality, table(OzHi = Ozone > 80, Month)) |> 
  DescTools::Desc(plotit = FALSE)
```

Expected behavior

No extra symbols of color codes. e.g.

/.../
Mantel-Haenszel Chi-squared:
  X-squared = 1.1306, df = 1, p-value = 0.2876

Warning message:
  Exp. counts < 5: Chi-squared approx. may be incorrect!!

Contingency Coeff.     0.287
Cramer's V             0.300
Kendall Tau-b          0.065

/.../

If possible, the colored output would be appreciated too. But at least no extra symbols would be nice too.

Actual behavior
/.../
Mantel-Haenszel Chi-squared:
  X-squared = 1.1306, df = 1, p-value = 0.2876

Warning message:
  Exp. counts < 5: Chi-squared approx. may be incorrect!!


Contingency Coeff.     0.287
Cramer's V             0.300
Kendall Tau-b          0.065
/.../

image

Your environment
RStudio Edition : Desktop [Open Source]
RStudio Version : 2023.6.0.401
OS Version      : Windows 10 x64 (build 19045)
R Version       : R version 4.3.0 (2023-04-21 ucrt)
Quarto:         : 1.4.111
Quarto check output
$ quarto check

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.4.111
      Path: C:\Users\user\AppData\Local\Programs\Quarto\bin
      CodePage: 1257

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.9.15 (Conda)
      Path: C:/Users/user/anaconda3/python.exe
      Jupyter: 5.2.0
      Kernels: ir, julia-1.9, proj-ml-1, python3

(\) Checking Jupyter engine render....2023-05-30 19:08:32,583 - traitlets - ERROR - Failed to run command:
['C:\\Users\\user\\anaconda3\\envs\\proj-ml-1\\python.exe', '-m', 'ipykernel_launcher', '-f', 'C:\\Users\\user\\AppData\\Local\\Temp\\tmp5bcejmxp.json']
    PATH='C;C:\\Program Files\\Git\\Users\\user\\anaconda3;C;C:\\Program Files\\Git\\Users\\user\\anaconda3\\Scripts;C:\\Users\\user\\anaconda3;C:\\Users\\user\\anaconda3\\Library\\mingw-w64\\bin;C:\\Users\\user\\anaconda3\\Library\\usr\\bin;C:\\Users\\user\\anaconda3\\Library\\bin;C:\\Users\\user\\anaconda3\\Scripts;C:\\Users\\user\\anaconda3\\bin;C:\\Users\\user\\anaconda3\\condabin;C:\\Program Files\\RStudio\\resources\\app\\resources\\terminal\\bash\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\local\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program Files\\Git\\mingw64\\bin;C:\\Program Files\\Git\\usr\\bin;C:\\Program
Files\\RStudio\\resources\\app\\resources\\terminal\\bash\\bin;C:\\Users\\user\\anaconda3\\Scripts;C:\\Users\\user\\anaconda3;C:\\RBuildTools\\4.3\\x86_64-w64-mingw32.static.posix\\bin;C:\\RBuildTools\\4.3\\usr\\bin;C:\\Program Files\\R\\R-4.3.0\\bin\\x64;C:\\Program Files\\Microsoft MPI\\Bin;C:\\Python39\\Scripts;C:\\Python39;C:\\Rtools\\bin;C:\\ProgramData\\Boxstarter;C:\\Program Files\\ImageMagick-7.0.8-Q16;C:\\Rtools\\bin;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Rtools\\mingw_32\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\bin;C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\libnvvp;C:\\Program Files\\ImageMagick-6.9.3-Q16;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\Intel\\iCLS Client;C:\\Program Files\\Intel\\iCLS Client;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\WiFi\\bin;C:\\Program Files\\Common Files\\Intel\\WirelessCommon;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files (x86)\\Aspell\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0;C:\\Program Files (x86)\\QuickTime\\QTSystem;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64;C:\\Program Files\\R\\R-3.4.0\\library\\tcltk\\libs\\x64;C:\\WINDOWS\\System32\\OpenSSH;C:\\Users\\user\\AppData\\Local\\Programs\\orca;C:\\Program
Files\\Microsoft VS Code\\bin;C:\\Program Files\\R\\R-3.5.1\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0;C:\\WINDOWS\\System32\\OpenSSH;C:\\Program Files\\SourceGear\\Common\\DiffMerge;C:\\Program Files\\Git LFS;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files\\dotnet;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile;C:\\Program Files (x86)\\Common Files\\Acronis\\VirtualFile64;C:\\Program Files (x86)\\Common Files\\Acronis\\SnapAPI;C:\\Program Files\\Crucial\\Crucial Storage Executive;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\Binn;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\DTS\\Binn;C:\\Program Files\\Microsoft SQL Server\\150\\DTS\\Binn;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn;C:\\Program Files\\Azure Data Studio\\bin;C:\\Program Files\\PuTTY;C:\\Program Files\\gs\\gs9.56.1\\bin;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Program Files\\gnuplot\\bin;C:\\Program Files (x86)\\Meld;C:\\Program Files\\nodejs;C:\\Program Files\\Git\\cmd;C:\\Program Files\\PowerShell\\7;C:\\Users\\user\\AppData\\Local\\P[>] Checking Jupyter engine render....OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.