atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Wrong syntax highlight with multiline strings #109

Open hugoboos opened 5 years ago

hugoboos commented 5 years ago

Prerequisites

Description

Following keys have wrong syntax highlight when the first item has a multiline string.

Steps to Reproduce

Screen Shot 2019-05-17 at 11 49 00

Edit by @rsese to add copy/paste code and a scopes image

list_1:
  - item_a: |
      line 1
      line 2
    item_b: value

list_2:
  - item_b: 
    item_a: |
      line 1
      line 2
    item_c: value

yaml-bug

Versions

Atom    : 1.36.1
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3
apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.36.1
python 2.7.10
git 2.21.0
rsese commented 5 years ago

Thanks for the report! Reproduced with 1.39.0-nightly5 on macOS 10.12.6:

yaml-bug

hugoboos commented 5 years ago

@rsese I was wondering what do the 'd', 'i' and 'v' labels mean? Just being curious.

rsese commented 5 years ago

Hey @hugoboos :wave: They're rough estimates of difficulty, impact, and visibility of the issue - this helps us think about prioritization given the team's finite resources.

jniac commented 4 years ago

Workaround: do not declare the first key right after the dash :

ElvenSpellmaker commented 4 years ago

Hey @rsese, Hey, I just stumbled across this issue because Github uses this downstream, but also wondered what d, i, and v were. An idea would be to rename them to their full meanings so everyone knows what they mean? They're currently quite cryptic! šŸ™‚