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

Markdown preview of HTTP with JSON body turns green #207443

Closed
gurksaften opened this issue Mar 12, 2024 · 3 comments
Closed

Markdown preview of HTTP with JSON body turns green #207443

gurksaften opened this issue Mar 12, 2024 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) markdown Markdown support issues

Comments

@gurksaften
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.1
  • OS Version: Windows 10 Pro 22H2 64-bit

Steps to Reproduce:

  1. Create a .md file with the following contents:
```http
HTTP/1.1 200 OK
Content-Type: application/json

{
	"ab": "a for abc abc a"
}
```
  1. Open the preview of the the file and it will render the JSON strings as italic green (i assume comment-style).
    image

  2. Add a space between f and or in the word for in the body causes the rendering of the JSON to return to normal.
    image

This seems to affect the entire body when the bug triggers causing all JSON strings to turn italic green unless you find the offending part of the JSON.

@Gobinath-B
Copy link

@mjbvz i want to work on this issue

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 21, 2024

This is an issue with highlight js we use in the preview. Switching to use VS Code's highlighting seems like the proper fix long term: #91279

@mjbvz mjbvz closed this as completed Mar 21, 2024
@mjbvz mjbvz added markdown Markdown support issues *duplicate Issue identified as a duplicate of another issue(s) labels Mar 21, 2024
@gurksaften
Copy link
Author

Good job, @mjbvz, thank you. 👍

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) markdown Markdown support issues
Projects
None yet
Development

No branches or pull requests

3 participants