redhat-developer / redhat-developer/vscode-yaml

Newlines and other chars in JSON schema "examples" property interpreted correctly

Open
#1,009 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Describe the bug

Newlines and other chars are not reflected properly when hovering over a variable in YAML file which uses a JSON schema containing the "examples" property

example.schema.json

YAML contents:

prop: This\n    is\n    wrong\n    while\n    doing\n    hover    \n

Expected Behavior

I would expect to see the text with newlines and other chars correctly interpreted

Current Behavior

This is what I see when hovering over prop in the YAML file:
image

Steps to Reproduce

  1. Refer from YAML file to example.schema.json
  2. Write prop in the YAML file
  3. Hover over prop

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

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.

Research direction

Start by tracing the hover behavior for a YAML property whose JSON schema uses the examples property, using the attached example.schema.json and YAML reproduction. Verify how newline and other characters are interpreted, then confirm that hovering over prop displays the expected text correctly on Linux.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.