Ruby语法高亮库 Coderay

码农软件 · 软件分类 · 其他开发相关 · 2019-11-01 22:12:26

软件介绍

CodeRay是一个语法高亮的Ruby库,效率很不错。

CodeRay目前支持的语法包括:

  1. Ruby
  2. C
  3. Delphi
  4. HTML
  5. RHTML (Rails)
  6. Nitro-XHTML
  7. YAML
  8. SQL
  9. Python
  10. Perl
  11. PHP
  12. Java

安装方法:gem install coderay

示例代码:

require 'rubygems'
require 'coderay'
tokens = CodeRay.scan <<-'CODE', :ruby
puts %[Hello, world!]
puts "Here
\'s some #@@weird #{ { :code => "for you" } }"
CODE

print tokens.div(:line_numbers => :table, :css => :class)

本文地址:https://www.codercto.com/soft/d/18069.html

Web Design in a Nutshell

Web Design in a Nutshell

Jennifer Niederst / O'Reilly Media, Inc. / 2006-02-21 / USD 34.99

Are you still designing web sites like it's 1999? If so, you're in for a surprise. Since the last edition of this book appeared five years ago, there has been a major climate change with regard to web......一起来看看 《Web Design in a Nutshell》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

随机密码生成器
随机密码生成器

多种字符组合密码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码