-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colour console output stripped from both Julia backends #12117
Comments
@MichaelHatherly I see this in the intermediate .md output for this cell
::: {#4 .cell execution_count=1}
``` {.julia .cell-code}
printstyled("Hello, World!", color=:red)
```
::: {.cell-output .cell-output-stdout}
```
Hello, World!
```
:::
::: So no ANSI character or color in the output that Quarto gets - processing must happen in TS before any Lua processing
We use quarto-cli/src/core/jupyter/jupyter.ts Lines 1879 to 1898 in ffb8c3d
and in Error output as you found quarto-cli/src/core/jupyter/jupyter.ts Lines 1794 to 1821 in ffb8c3d
as pointed out above special support was added in #10347 So it is either not working as expected for Julia engine - or we need to handle it differently. 🤔 |
Great ! I don't think this is tied to Julia in Jupyter. We do handle ANSI only a few places, and quarto-cli/src/core/jupyter/jupyter.ts Lines 1621 to 1634 in a0ff13f
quarto-cli/src/core/jupyter/jupyter.ts Lines 1769 to 1792 in a0ff13f
We'll wait on your PR if you want to tackle this. Thanks ! |
Bug description
Both the Jupyter-based backend and https://github.com/PumasAI/QuartoNotebookRunner.jl cannot print colour output to stdout in notebook cells. Originally seen in PumasAI/QuartoNotebookRunner.jl#94 (comment).
The first image is using QNR. The output from the first two cells is expected to have some amount of colour highlighting. None is rendered. Note that QNR is returning the expected JSON output with ANSI codes embedded:
it just gets stripped afterwards, presumably somewhere in
quarto
? Worth noting that the output of the third cell is a stacktrace that does manage to print the correct colours in it's output. I assume these are hitting different code paths?This image is from the jupyter backend, same issue appears here:
Steps to reproduce
QNR backend:
Jupyter backend:
Actual behavior
No response
Expected behavior
Colour output should print correctly in cell outputs.
Your environment
Quarto check output
The text was updated successfully, but these errors were encountered: