Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

YAML highlighting of value portion of key-value for non-quoted, non-multiline strings continues onto next line erroneously #78

Closed
1 task done
BlaineEXE opened this issue Mar 23, 2017 · 4 comments · Fixed by #100 · May be fixed by #79
Closed
1 task done
Labels

Comments

@BlaineEXE
Copy link

Prerequisites

Description

[Description of the issue]

YAML highlighting for a key's value continues onto the next line when it is a simple, non-quoted string (not a list, another key, a multiline string (with | or >), etc, and the highlighting should not continue.

Simple test case in YAML file to reproduce

this: key
is
highlighted
over
arbitrary
number
of
lines

Expected behavior: [What you expect to happen]
When using a simple, non-quoted string in YAML, I expect the next line's content to not be highlighted unless it is a quoted string, a list, a multiline string (with | or >), etc. In the example, 'is' begins a line that violates YAML's syntax. One suggestion that this case is the correct one is that trying to load a test yaml file in Python with the text will throw an error with the text could not find expected ':' on the example line "is".

Actual behavior: [What actually happens]
YAML highlighting for a key's value continues onto the next line when it is a simple, non-quoted string (not a list, another key, a multiline string (with | or >), etc. See image below.

image

Reproduces how often: [What percentage of the time does it reproduce?]
Always

Versions

atom --version
Atom : 1.14.4
Electron: 1.3.13
Chrome : 52.0.2743.82
Node : 6.5.0

apm --version
apm 1.15.3
npm 3.10.5
node 4.4.5 x64
python 2.7.13
git 2.12.0

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

@winstliu
Copy link
Contributor

So yes, this is an issue. However, it is a very difficult issue to fix. I've made some (non-visible) progress with it in #74.

@winstliu winstliu added the bug label Mar 23, 2017
@BlaineEXE
Copy link
Author

BlaineEXE commented Mar 24, 2017

Thank you! I believe this issue is the root behind support for Jinja2 highlighting in YAML files: danielchatfield/atom-jinja2#22

Update: Just installed language-yaml 0.29, and YAML with Jinja now highlights properly. Thank you, @50Wliu !

@jerowe
Copy link

jerowe commented Dec 15, 2017

I either have a similar or the same issue.

yaml-syntax-highlighting

Syntax highlighting for a multiline string continues after the multiline string.

It happened very shortly after I updated all my atom packages, but I'm not sure what version I was on before.

➜  atom atom --safe
➜  atom atom --version
Atom    : 1.22.1
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0
➜  atom apm --version
apm  1.18.8
npm  3.10.10
node 6.9.5 x64
python 2.7.13
git 2.11.0

I also moved all of my ~/.atom to ~/.atom-backup.

@russianryebread
Copy link

russianryebread commented Feb 1, 2018

I have a similar issue, though it's also erroneously highlighting a hidden char (space)

screen shot 2018-02-01 at 12 55 00 pm

Atom    : 1.23.3
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants