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

Parsing example object as plain string #889

Closed
AceTheCreator opened this issue Jun 2, 2023 · 0 comments
Closed

Parsing example object as plain string #889

AceTheCreator opened this issue Jun 2, 2023 · 0 comments

Comments

@AceTheCreator
Copy link
Contributor

Is your enhancement related to a problem? Please describe.

When the example is rendered in the tooltip, it looks like a long string, which makes it difficult to read and needs formatting when copied.

Describe the solution you would like

So I suggest we stringify this line of code https://github.com/redhat-developer/yaml-language-server/blob/main/src/languageservice/services/yamlHover.ts#L156 with JSON.stringify(example, null, 2) which makes the example stringified but with additional spaces, so it looks structured, readable and nice

Describe alternatives you have considered

None

Additional context

This is what the examples payload currently looks like in the tooltip, a long plain string
242599819-380b2aba-ed3c-40a8-bd82-3f87577423ea

AceTheCreator added a commit to AceTheCreator/yaml-language-server that referenced this issue Jun 2, 2023
Enhanced how examples are being parsed as a plain string 

fixes redhat-developer#889
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants