unindenting code blocks - thanks to _n_
authorMichiel de Jong <michiel@unhosted.org>
Tue, 6 Mar 2012 18:05:27 +0000 (18:05 +0000)
committerMichiel de Jong <michiel@unhosted.org>
Tue, 6 Mar 2012 18:05:27 +0000 (18:05 +0000)
README.md

index 72440f8..0cc65cd 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,37 +8,37 @@ This is version 0.4.5 of the library, and you can use it under AGPL or MIT licen
 Minimal HTML:
 
 ```html
-    <!DOCTYPE html>
-    <html>
-      <head>
-        <script src="./path/to/require.js"></script>
-        <script src="./path/to/your/app.js"></script>
-      </head>
-      <body></body>
-    </html>
+<!DOCTYPE html>
+<html>
+  <head>
+    <script src="./path/to/require.js"></script>
+    <script src="./path/to/your/app.js"></script>
+  </head>
+  <body></body>
+</html>
 ```
 
 Your `app.js`:
 
 ```js
-    require(['./path/to/remoteStorage'], function(remoteStorage) {
-      remoteStorage.getStorageInfo('user@example.com', function(err, storageInfo) {
-        var token = remoteStorage.receiveToken();
-        if(token) {
-          //we can access the 'contacts' category on the remoteStorage of user@example.com:
-          var client = remoteStorage.createClient(storageInfo, 'contacts', bearerToken);
-          client.put('foo', 'bar', function(err) {
-            client.get('foo', function(err, data) {
-              client.delete('foo', function(err) {
-              });
-            });
+require(['./path/to/remoteStorage'], function(remoteStorage) {
+  remoteStorage.getStorageInfo('user@example.com', function(err, storageInfo) {
+    var token = remoteStorage.receiveToken();
+    if(token) {
+      //we can access the 'contacts' category on the remoteStorage of user@example.com:
+      var client = remoteStorage.createClient(storageInfo, 'contacts', bearerToken);
+      client.put('foo', 'bar', function(err) {
+        client.get('foo', function(err, data) {
+          client.delete('foo', function(err) {
           });
-        } else {
-          //get an access token for 'sandwiches' by dancing OAuth with the remoteStorage of user@example.com:
-          window.location = remoteStorage.createOAuthAddress(storageInfo, ['contacts'], window.location.href);
-        }
+        });
       });
-    });
+    } else {
+      //get an access token for 'sandwiches' by dancing OAuth with the remoteStorage of user@example.com:
+      window.location = remoteStorage.createOAuthAddress(storageInfo, ['contacts'], window.location.href);
+    }
+  });
+});
 ```
 
 #Function reference