-
Notifications
You must be signed in to change notification settings - Fork 5
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
Should inline comments be included in the spec? #16
Comments
The latest draft of the spec has removed these, so I'll close this but feel free to leave any lingering thoughts you have here. |
Yes, please keep some form of inline comments in the spec. I don't care how ugly the syntax is going to be. Let's go for JS style comments, they are pretty easy to type, widely known (among developers at least) and have a low chance of being typed accidentally. My main use case is if you want to explain a key format.
|
I really like how you can define the template tags in underscore templates by passing a regex. maybe we could do the same in archieml-js? so anyone could redefine their favorite inline comment style archieml.options({
// regex for /* */ comments
commentRegex: /(?:\/\*(?:[\s\S]*?)\*\/)|(?:([\s;])+\/\/(?:.*)$)/gm
}); |
I'm open to this as something opt-in. My main concern at this point would be creating into a state where We can definitely take a stab at this on a branch of archieml-js and see how it works in practice. Happy to look at it eventually, but if anyone wants to take a stab at a pull request, this should be pretty self-contained. |
Well, then let's simply use |
Several previous issues (#14 #15) have addressed cases where single-bracket inline comments are confusing, or not flexible enough. Looking through our own use of ArchieML at the New York Times, we discovered that we virtually never use them.
To avoid some of the confusion from #15, and to simplify parsing in general, there are two proposals:
Has anyone been using inline comments? If so, what do you think about these options?
The text was updated successfully, but these errors were encountered: