Skip to content
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

Syntax highlighting in the output of tests explorer #17411

Open
Diogo-Rossi opened this issue Sep 14, 2021 · 5 comments
Open

Syntax highlighting in the output of tests explorer #17411

Diogo-Rossi opened this issue Sep 14, 2021 · 5 comments
Assignees
Labels
area-testing feature-request Request for new features or functionality needs PR Ready to be worked on

Comments

@Diogo-Rossi
Copy link

Diogo-Rossi commented Sep 14, 2021

Now that there will be a new announced built-in test tool for python,
it will be good that some good details of an old test explorer extension become available, like the syntax highlighting in the output of failed test, as show bellow:


This is the floating output of the ""old"" Python Test Explorer for Visual Studio Code.

We can see syntax highlighting and monospace font.

old


Any output of the new tool does not show syntax highlighting:

new

new2


Feature request

Show syntax highlighting in the output of failed tests in the new built-in tool of the tests.

@Diogo-Rossi Diogo-Rossi added triage-needed Needs assignment to the proper sub-team feature-request Request for new features or functionality labels Sep 14, 2021
@karthiknadig karthiknadig added area-testing good first issue needs PR and removed triage-needed Needs assignment to the proper sub-team labels Sep 14, 2021
@pralkarz
Copy link

I assume the fix isn't too difficult (hence the good first issue label), so would it be okay if I worked on this issue?

@pralkarz
Copy link

I worked on the issue and I managed to get syntax highlighting to work via VSCode's built-in Markdown engine, however there are two problems.

  1. You can't select (and, consequently, copy) the code unless you open it in the editor via the button in the top-right, which might be a bit inconvenient.
  2. For some reason the code blocks don't get rendered as-is and the whitespace is squashed similarly to the regular HTML, so the code isn't indented properly.
    image

Sample code for a test message looks like this:

const markdownText = new MarkdownString().appendCodeblock(text, "python");
const message = new TestMessage(markdownText);

Now I tried using non-breaking spaces ( ) and building the message manually without the MarkdownString.appendCodeblock method, but none of that worked. Maybe there is an issue with the VSCode's Markdown renderer?

@pralkarz
Copy link

Kindly bump.

Please do tell me if this is rude. I'm still relatively new to open-source, so I'm not sure what's acceptable and what's not.

@Diogo-Rossi
Copy link
Author

@ziebam Sorry for not to reply earlier.
Sadly, I cant't help to develop extensions in VS Code. I just made the feature request.
Maybe someone from the developers team could say something.

@github-actions github-actions bot removed the needs PR label Aug 9, 2022
@karrtikr karrtikr added the needs PR Ready to be worked on label Aug 9, 2022
@pasumarty08
Copy link

Can I be assigned this issue please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing feature-request Request for new features or functionality needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

7 participants