From f375e1f89dbd98499d3467fe2ee1afffc6bf5e64 Mon Sep 17 00:00:00 2001 From: Chris DeLuca Date: Tue, 22 Sep 2015 17:12:11 -0400 Subject: [PATCH] Add syntax highlighting to readme code snippet --- README.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9cbb202..a906598 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,21 @@ Exposes `gh` to the global environment. Tries to follow both the form of Github HTTP API and JS style. - gh.authenticate("fitzgen", "sdfk32we-FAKE-uydfs7f-rhrwe8r7"); - var huddlej = gh.user("huddlej"); - huddlej.show(function (data) { - console.log(data.user); - }); - huddlej.repos(function (data) { - console.log("Number of repos: " + data.repositories.length); - }); - var wujs = gh.repo("fitzgen", "wu.js") - wujs.show(function (data) { - console.log("Number of watchers: " + data.repository.watchers); - }); - wujs.update({ has_wiki: 0 }); // Unfortunately, no callbacks with POSTs :( +```js +gh.authenticate("fitzgen", "sdfk32we-FAKE-uydfs7f-rhrwe8r7"); +var huddlej = gh.user("huddlej"); +huddlej.show(function (data) { + console.log(data.user); +}); +huddlej.repos(function (data) { + console.log("Number of repos: " + data.repositories.length); +}); +var wujs = gh.repo("fitzgen", "wu.js") +wujs.show(function (data) { + console.log("Number of watchers: " + data.repository.watchers); +}); +wujs.update({ has_wiki: 0 }); // Unfortunately, no callbacks with POSTs :( +``` COMPLETE ======== @@ -30,4 +32,4 @@ COMPLETE TODO ==== -* Documentation \ No newline at end of file +* Documentation