Skip to content

Instantly share code, notes, and snippets.

@Artanis
Created March 7, 2015 09:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Artanis/675f3fb80523a04b6a28 to your computer and use it in GitHub Desktop.
Save Artanis/675f3fb80523a04b6a28 to your computer and use it in GitHub Desktop.
Code formatting example
// For https://plus.google.com/+dartlang/posts/Qy6HJPxgTfm
// Break after OR operations.
// Break before and indent AND operations.
// Evaluate groups recursively.
if (tag=='style' ||
tag=='script'
&& (type=null || type==TYPE_JS || type==TYPE_DART) ||
tag=='link'
&& (rel=='stylesheet' || rel=='import')) {}
// Only problem with doing this (to any long conditional, really) is the dangling code block at the end. :/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment