To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / .svn / pristine / 97 / 97f9ea0ada27476051514e5aebe9f3fa15fc996b.svn-base @ 1297:0a574315af3e

History | View | Annotate | Download (4.46 KB)

1
= CodeRay
2

    
3
Tired of blue'n'gray? Try the original version of this documentation on
4
coderay.rubychan.de[http://coderay.rubychan.de/doc/] :-)
5

    
6
== About
7

    
8
CodeRay is a Ruby library for syntax highlighting.
9

    
10
You put your code in, and you get it back colored; Keywords, strings,
11
floats, comments - all in different colors. And with line numbers.
12

    
13
*Syntax* *Highlighting*...
14
* makes code easier to read and maintain
15
* lets you detect syntax errors faster
16
* helps you to understand the syntax of a language
17
* looks nice
18
* is what everybody wants to have on their website
19
* solves all your problems and makes the girls run after you
20

    
21

    
22
== Installation
23

    
24
 % gem install coderay
25

    
26

    
27
=== Dependencies
28

    
29
CodeRay needs Ruby 1.8.7+ or 1.9.2+. It also runs on Rubinius and JRuby.
30

    
31

    
32
== Example Usage
33

    
34
 require 'coderay'
35
 
36
 html = CodeRay.scan("puts 'Hello, world!'", :ruby).div(:line_numbers => :table)
37

    
38

    
39
== Documentation
40

    
41
See CodeRay.
42

    
43

    
44
== Credits
45

    
46
=== Special Thanks to
47

    
48
* licenser (Heinz N. Gies) for ending my QBasic career, inventing the Coder
49
  project and the input/output plugin system.
50
  CodeRay would not exist without him.
51
* bovi (Daniel Bovensiepen) for helping me out on various occasions.
52

    
53
=== Thanks to
54

    
55
* Caleb Clausen for writing RubyLexer (see
56
  http://rubyforge.org/projects/rubylexer) and lots of very interesting mail
57
  traffic
58
* birkenfeld (Georg Brandl) and mitsuhiku (Arnim Ronacher) for PyKleur, now pygments.
59
  You guys rock!
60
* Jamis Buck for writing Syntax (see http://rubyforge.org/projects/syntax)
61
  I got some useful ideas from it.
62
* Doug Kearns and everyone else who worked on ruby.vim - it not only helped me
63
  coding CodeRay, but also gave me a wonderful target to reach for the Ruby
64
  scanner.
65
* everyone who uses CodeBB on http://www.rubyforen.de and http://www.python-forum.de
66
* iGEL, magichisoka, manveru, WoNáDo and everyone I forgot from rubyforen.de
67
* Dethix from ruby-mine.de
68
* zickzackw
69
* Dookie (who is no longer with us...) and Leonidas from http://www.python-forum.de
70
* Andreas Schwarz for finding out that CaseIgnoringWordList was not case
71
  ignoring! Such things really make you write tests.
72
* closure for the first version of the Scheme scanner.
73
* Stefan Walk for the first version of the JavaScript and PHP scanners.
74
* Josh Goebel for another version of the JavaScript scanner, a SQL and a Diff scanner.
75
* Jonathan Younger for pointing out the licence confusion caused by wrong LICENSE file.
76
* Jeremy Hinegardner for finding the shebang-on-empty-file bug in FileType.
77
* Charles Oliver Nutter and Yehuda Katz for helping me benchmark CodeRay on JRuby.
78
* Andreas Neuhaus for pointing out a markup bug in coderay/for_redcloth.
79
* 0xf30fc7 for the FileType patch concerning Delphi file extensions.
80
* The folks at redmine.org - thank you for using and fixing CodeRay!
81
* Keith Pitt for his SQL scanners
82
* Rob Aldred for the terminal encoder
83
* Trans for pointing out $DEBUG dependencies
84
* Flameeyes for finding that Term::ANSIColor was obsolete
85
* matz and all Ruby gods and gurus
86
* The inventors of: the computer, the internet, the true color display, HTML &
87
  CSS, VIM, Ruby, pizza, microwaves, guitars, scouting, programming, anime, 
88
  manga, coke and green ice tea.
89

    
90
Where would we be without all those people?
91

    
92
=== Created using
93

    
94
* Ruby[http://ruby-lang.org/]
95
* Chihiro (my Sony VAIO laptop); Henrietta (my old MacBook);
96
  Triella, born Rico (my new MacBook); as well as
97
  Seras and Hikari (my PCs)
98
* RDE[http://homepage2.nifty.com/sakazuki/rde_e.html],
99
  VIM[http://vim.org] and TextMate[http://macromates.com]
100
* Subversion[http://subversion.tigris.org/]
101
* Redmine[http://redmine.org/]
102
* Firefox[http://www.mozilla.org/products/firefox/],
103
  Firebug[http://getfirebug.com/], Safari[http://www.apple.com/safari/], and
104
  Thunderbird[http://www.mozilla.org/products/thunderbird/]
105
* RubyGems[http://docs.rubygems.org/] and Rake[http://rake.rubyforge.org/]
106
* TortoiseSVN[http://tortoisesvn.tigris.org/] using Apache via
107
  XAMPP[http://www.apachefriends.org/en/xampp.html]
108
* RDoc (though I'm quite unsatisfied with it)
109
* Microsoft Windows (yes, I confess!) and MacOS X
110
* GNUWin32, MinGW and some other tools to make the shell under windows a bit
111
  less useless
112
* Term::ANSIColor[http://term-ansicolor.rubyforge.org/]
113
* PLEAC[http://pleac.sourceforge.net/] code examples
114
* Github
115
* Travis CI (http://travis-ci.org/rubychan/github)
116

    
117
=== Free
118

    
119
* As you can see, CodeRay was created under heavy use of *free* software.
120
* So CodeRay is also *free*.
121
* If you use CodeRay to create software, think about making this software
122
  *free*, too.
123
* Thanks :)