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

Add YAML support #36

Open
wmertens opened this issue Feb 16, 2015 · 0 comments
Open

Add YAML support #36

wmertens opened this issue Feb 16, 2015 · 0 comments

Comments

@wmertens
Copy link

TL;DR: With YAML you can write begin: \bstart\b instead of begin: "\\bstart\\b".

I know YAML and CSON are quite similar, but YAML allows strings to remain unquoted (http://www.yaml.org/spec/1.2/spec.html#id2788859), which allows writing bare regexes and makes writing things like https://github.com/wmertens/sublime-nix/blob/master/nix.YAML-tmLanguage a lot easier.

It is also what is used by many grammars for Sublime, via the AAAPackageDev tools, and github allows it in linguist.

Here's a YAML-tmLanguage highlighter used on github to highlight a YAML-tmLanguage file. Ignore the regex illegal character issues, the highlighter isn't 100% right since it does parse cleanly, as evidenced by http://nodeca.github.io/js-yaml/ which is what is linked from the yaml.org website.

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

No branches or pull requests

2 participants