`

RedCloth使用方法

阅读更多

RedCloth是一个令你可以在Ruby中使用Textile的模块。Textile是一个文本格式,一个非常简单的文本格式。可以将一个可读的文本转成HTML。

1.安装

$ gem install RedCloth

NB: The RedCloth gem name is CamelCase, not lowercase. If you mistakenly do a gem install redcloth, you’ll get ERROR: could not find redcloth locally or in a repository.

2源码安装:

$ git clone git://github.com/jgarber/redcloth.git
$ cd redcloth
$ rake install

You’ll need echoe and Ragel to compile it.

3.使用redcloth

RedCloth.new("Some text").to_html
  #=> "<p>Some text</p>"

See the Official Textile Reference Manual for RedCloth 4 for help with Textile formatting

 

1
4
分享到:
评论

相关推荐

    redcloth 安装至ruby on rails 项目中

    redcloth使用,其包括了redcloth.rb以及页面显示用到的js,css,image.以及语法帮助。 博文链接:https://hooney.iteye.com/blog/208838

    What is RedCloth

    **什么是RedCloth** RedCloth是一个Ruby库,它允许开发者将文本格式化为HTML,特别是处理Markdown和Textile语法。...理解其工作原理和使用方法对于提升Ruby应用的用户体验和文档质量具有重要意义。

    redcloth, RedCloth是一个用于将 Textile 转换为HTML的ruby 库.zip

    redcloth, RedCloth是一个用于将 Textile 转换为HTML的ruby 库 RedCloth - ruby的Textile 解析器主页redcloth.org维护者Joshua Siler github.com/joshuasiler作者Garber版权

    redcloth-formatters-plain:与RedCloth中包含HTML和Latex格式化程序类似,这一代码使您可以将Textile转换为纯文本,而无需使用Textile语法

    RedCloth :: Formatters :: Plain 与RedCloth中包含的HTML和Latex格式化程序类似,此格式允许您将Textile转换为纯文本,而无需使用Textile语法。依存关系这个插件只需要 。例子RedCloth.new("p. this is *simple* _...

    wiki引擎git-wiki.zip

    git-wiki 是使用 Git 做为数据存储的 wiki 引擎,使用 Ruby 开发。要求环境支持: rubygems sinatra grit redcloth rubypants 标签:gitwiki

    jekyll gem

    8. **activesupport-4.1.6.gem**: ActiveSupport 是Ruby on Rails框架的一部分,提供了一系列实用的工具和方法,如日期时间处理、字符串操作等。在Jekyll中,它可能作为其他Gem的依赖,提供便利的功能。 9. **...

    JavaCloth-开源

    JavaCloth是一个开源项目,它的出现是为了在Java环境中提供与RedCloth和Markdown类似的文本解析功能。RedCloth是Textile格式的一种实现,而Markdown则是一种轻量级的标记语言,两者都广泛用于将易读的文本格式转换为...

    webgen-website:Webgen网站的来源

    Webgen网站的来源 ...$ gem install maruku rdiscount rdoc RedCloth sass $ gem install webgen-zurb_foundation-bundle $ gem install webgen-font_awesome-bundle $ gem install webgen-tipue_search-bund

    rubygems-1.6.2.tgz

    在Redmine的安装过程中,RubyGems用于获取和安装Redmine本身及其依赖的gem,比如数据库连接器(如pg或mysql2)、文本处理库(如RedCloth或Kramdown)、邮件处理库(如ActionMailer)等。这些gem确保了Redmine能够...

    YAML.rb: YAML for Ruby-开源

    `PStore`虽然功能强大,但它的使用场景可能相对有限,而`YAML.rb`通过支持更丰富的数据结构和更灵活的序列化/反序列化,可以适应更广泛的项目需求。 使用`YAML.rb`,开发者可以方便地将Ruby对象转换成YAML格式的...

    diy-broadcast:自己动手做广播电视台广播项目

    gem install RedCloth -v '4.2.9' gem install nokogiri -v '1.6.6.2' 克隆此存储库后,运行: bundle install以下载构建所需的依赖项。 bundle exec jekyll serve在本地运行,或bundle exec jekyll build ./...

    rdiscount:打折(对于Ruby)John Gruber的Markdown的实现

    Ruby降价促销处理器 Discount是...用法RDiscount实现了RedCloth流行并被BlueCloth采用的基本协议: require 'rdiscount'markdown = RDiscount.new("Hello World!")puts markdown.to_html创建RDiscount对象时,可以打

Global site tag (gtag.js) - Google Analytics