-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comma list whitespace expand #23
Conversation
ometa KrasotaJS <: KrasotaJSIdentity { | ||
|
||
commaListItemFirstCommentFirstSpaces = ['spaces' :t] -> | ||
[#spaces, t.indexOf('\n' ) === -1 ? ' ' : t], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use OmetaJS custom predicates: ['spaces' (:s ?(t.indexOf('\n' ) === -1) -> ' ' | :s):t] -> [#spaces, t]
or better make rule about "contains \n" and use it in commaListItemLastCommentLastSpaces
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry but i think your way of writing this function increase complexity without providing any other benefits :)
But i think, independed rule make sense so i'll try to rewrite code this way
No description provided.