Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (9 sloc) 0.257 kB
require 'coderay'
html_encoder = CodeRay.encoder :html
scanner = Hash.new do |h, lang|
h[lang] = CodeRay.scanner lang
end
for lang in [:ruby, :html]
tokens = scanner[lang].tokenize 'test <test>'
puts html_encoder.encode_tokens(tokens)
end
Jump to Line
Something went wrong with that request. Please try again.