atom / language-yaml

YAML package for Atom
Other
24 stars 39 forks source link

Strings that are part of a sequence are highlighted incorrectly if they contain a colon #21

Closed rpendleton closed 8 years ago

rpendleton commented 9 years ago

Strings that are part of a sequence are highlighted incorrectly if they contain a colon:

assignment: 'Sections 2.4 and 4.1'
problems: 
- 'Section 2.4: 3, 6abc, 12ab, 30, 32a'
- 'Section 4.1: 10ac, 12ab, 13ac, 14ac, 28, 30, 38, 40'
- 'Section 2.4 - 3, 6abc, 12ab, 30, 32a'
- 'Section 4.1 - 10ac, 12ab, 13ac, 14ac, 28, 30, 38, 40'
szhu commented 9 years ago

The weird thing about these issues is that they do not exist in Sublime Text.

Sublime Text uses YAML.tmLanguage, which appears to be yaml.tmbundle/Syntaxes/YAML.plist. Atom's language-yaml is converted from yaml.tmbundle.

Is there something wrong with the conversion process? Or are these two syntax packages not from the same source?

winstliu commented 9 years ago

Is there something wrong with the conversion process? Or are these two syntax packages not from the same source?

The tmbundle may have received updates after the package was converted, and those changes probably weren't synced back here.

yajo commented 8 years ago

I think I have the same issue:

captura de pantalla de 2016-03-04 12-08-05

code-tree commented 8 years ago

I can confirm this bug as well.

szhu commented 8 years ago

@50Wliu and other Atom team members, please give us the conversion tools you used to automatically convert the TextMate syntax bundle to language-yaml.

winstliu commented 8 years ago

@szhu The command appears to be apm init --package ~/.atom/packages/<package-name> --convert https://github.com/<repository>.

winstliu commented 8 years ago

Going to look at this after #44 is merged to prevent merge conflicts. The regex for capturing keys is way too lax.

Ajedi32 commented 8 years ago

This problem occurs even when the colon is in a comment:

image