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

Comma list whitespace expand #23

Merged
merged 11 commits into from
Nov 1, 2013

Conversation

L0stSoul
Copy link
Contributor

No description provided.

@L0stSoul
Copy link
Contributor Author

#20

ometa KrasotaJS <: KrasotaJSIdentity {

commaListItemFirstCommentFirstSpaces = ['spaces' :t] ->
[#spaces, t.indexOf('\n' ) === -1 ? ' ' : t],
Copy link
Owner

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

Copy link
Contributor Author

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

veged added a commit that referenced this pull request Nov 1, 2013
@veged veged merged commit 84ca2d7 into veged:master Nov 1, 2013
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

Successfully merging this pull request may close these issues.

2 participants