1. RDiscount
http://github.com/rtomayko/rdiscount
> sudo gem install rdiscount
Usage
RDiscount implements the basic protocol popularized by RedCloth and adopted by BlueCloth:
require 'rdiscount'
markdown = RDiscount.new("Hello World!")
puts markdown.to_html
Additional processing options can be turned on when creating the RDiscount object:
markdown = RDiscount.new("Hello World!", :smart, :filter_html)
Inject RDiscount into your BlueCloth-using code by replacing your bluecloth require statements with the following:
begin
require 'rdiscount'
BlueCloth = RDiscount
rescue LoadError
require 'bluecloth'
end
2. BlueCloth
http://deveiate.org/projects/BlueCloth
> sudo gem install bluecloth
Usage
require "bluecloth"
markdown = BlueCloth.new("<p>Hi</p>") or Markdown.new("<p>Hi</p>")
markdown.to_html
Tip : # BlueCloth has set the top-level 'Markdown' constant
::Markdown = ::BlueCloth unless defined?( ::Markdown )
分享到:
相关推荐
主要介绍了在Ruby on Rails中使用Markdown的方法,不过依赖于pygments.rb这个工具,事先得安装Python,需要的朋友可以参考下
马克 RMark 规定 Rails 应用程序在视图和部分中使用 Markdown。安装将此行添加到应用程序的 Gemfile 中: gem 'r_mark' 然后执行: $ bundle而且还应该安装降价解析器,比如, ,或只要你喜欢。用法所有需要做的就是...
现在可以在维护此gem。
resources :posts生成以下端点: GET|POST /posts GET|PUT /posts/:id 删除 /posts/:id安装$ npm i vuex-rails-plugin用法该插件可以像这样导入到任何 Vuex 商店: // store.jsimport Vuex from 'vuex'import Vue ...
oauth-plugin, 用于OAuth的Rails 插件 OAuth插件这是在 Rails 应用程序中实现OAuth提供者和消费者的插件。我们支持修改后的OAuth 1.0规格:tools.ietf. org/html/rfc5849以及对 OAuth 2.0的支持:tools.iet
rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails 2.3.2离线安装rails ...
[Pragmatic Bookshelf] Crafting Rails Applications Expert Practices for Everyday Rails Development (E-Book) ☆ 图书概要:☆ Rails 3 is a huge step forward. You can now easily extend the framework, ...
Ruby on Rails Guides v2 - Ruby on Rails 4.2.5
《Ruby on Rails Tutorial》中文版(原书第2版,涵盖 Rails 4) Ruby 是一门很美的计算机语言,其设计原则就是“让编程人员快乐”。David Heinemeier Hansson 就是看重了这一点,才在开发 Rails 框架时选择了 Ruby...
《Rails之道》按照Rails的各个子系统进行组织编排,分别介绍了Rails的环境、初始过程、配置和日志记录,Rails的分配器、控制器、页面生成和路由,REST、资源和Rails,ActiveRecord的基础、关联、验证和高级技巧,...
rails.vim提供了常用的一些命令,可以帮助开发,例如:Rgenerate, Rake, Rfind,RTview等,很方便,也很实用。...拷贝 autoload/rails.vim, plugin/rails.vim, 和 doc/rails.txt 到 ~/.vim 目录. 标签:rails
一个用Ruby on Rails搭建的图片分享的网站项目.完整源代码
本资源是参照rails敏捷开发第四版书中的例子,rails的版本是rails3.2.6
gem 'bootstrap-markdown-editor-rails' 您还需要Bootstrap 3,jQuery。 用法 需要带有链轮CSS: /*= require bootstrap-markdown-editor */ 链轮也需要JS: //= require ace-rails-ap //= require ace/theme-...
Bootstrap 3 和 Rails 4(样例用的是Ruby 2.1.1,Rails 4.1.4) Table of Contents Preface 1 Chapter 1: Introducing Web Application Development in Rails 7 Why Bootstrap with Rails? 8 Setting up a Todo ...
adminlte-rails, AdminLTE Rails gem 将AdminLTE主题与 Rails 资产管道集成 AdminLTE Rails gem AdminLTE 是后端的高级 Bootstrap 主题。英镑 AdminLTE Rails gem 与 Rails 资产管道集成了英镑AdminLTE主题。安装将...
to_xls护栏 这个简单的插件使您能够调用to_xls到Rails的数组集合。...rails plugin install git://github.com/liangwenke/to_xls-rails.git 在您的控制器中: def index @posts = Post . all resp
NetBeans Ruby and Rails IDE with JRuby 2009,大家看标题就知道了啊。。好东西啊,刚得到就发上来了。。