From d65bbfbe8d26fd4eb6fa2bedb49de7b1187d2cd3 Mon Sep 17 00:00:00 2001 From: Ted Nyman Date: Wed, 2 Jan 2013 01:28:37 -0800 Subject: [PATCH 1/2] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0e1d02ff..58cdc7a1 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,11 @@ The Language Graph you see on every repository is built by aggregating the langu The repository stats API can be used on a directory: - project = Linguist::Repository.from_directory(".") - project.language.name #=> "Ruby" - project.languages #=> { "Ruby" => 0.98, - "Shell" => 0.02 } +```ruby +project = Linguist::Repository.from_directory(".") +project.language.name #=> "Ruby" +project.languages #=> { "Ruby" => 0.98, "Shell" => 0.02 } +``` These stats are also printed out by the binary. Try running `linguist` on itself: From bcaeb5d46402ae983acb0c2ac6b2325829a02793 Mon Sep 17 00:00:00 2001 From: Ted Nyman Date: Wed, 2 Jan 2013 02:12:17 -0800 Subject: [PATCH 2/2] Fix readme link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58cdc7a1..03f7c98c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ See [lib/linguist/language.rb](https://github.com/github/linguist/blob/master/li The actual syntax highlighting is handled by our Pygments wrapper, [pygments.rb](https://github.com/tmm1/pygments.rb). It also provides a [Lexer abstraction](https://github.com/tmm1/pygments.rb/blob/master/lib/pygments/lexer.rb) that determines which highlighter should be used on a file. -We typically run on a prerelease version of Pygments, [pygments.rb](https://github.com/tmm1/pygments.rb), to get early access to new lexers. The [lexers.yml](https://github.com/github/linguist/blob/master/lib/linguist/lexers.yml) file is a dump of the lexers we have available on our server. +We typically run on a prerelease version of Pygments, [pygments.rb](https://github.com/tmm1/pygments.rb), to get early access to new lexers. The [languages.yml](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) file is a dump of the lexers we have available on our server. ### Stats