atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Negative Numbers are incorrectly highlighted #102

Closed unexceptable closed 6 years ago

unexceptable commented 6 years ago

Prerequisites

Description

Yaml syntax highlighing incorrectly highlights a negative number as a str rather than a number.

Steps to Reproduce

  1. open yaml file
  2. make key value where value is negative int
  3. observer incorrect syntax highlighting

Below used for testing:

some_wrapper:
  positive_int: 1234
  negative_int: -1234
  positive_float: 123.4
  negative_float: -123.4

Expected behavior: Negative numbers should correctly be highlighted as numbers not str.

Actual behavior: Negative numbers are highlighted as strings.

Reproduces how often: 100%

Versions

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

unexceptable commented 6 years ago

@50Wliu ty!

winstliu commented 6 years ago

No problem! This is scheduled for release in Atom 1.26 beta.