Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better template syntax #34

Open
cowboyd opened this issue Dec 8, 2022 · 0 comments
Open

Better template syntax #34

cowboyd opened this issue Dec 8, 2022 · 0 comments

Comments

@cowboyd
Copy link
Member

cowboyd commented Dec 8, 2022

Sadly, % is a special YAML character for registering tags, and that means that you have to put quotes around every single string that uses them in first position.

(person)=>: "%($person.first) %($person.last)"

This destroys one of the most useful features of YAML, which is that making strings is really easy. Instead, we should choose a template syntax that lets us drop the quotes. Here are a couple of suggestions.

(person)=>: << $person.first> << $person.last>
(person)=>: (= $person.first) (= $person.last)
(person)=>: (% $person.first) (% $person.last)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant