Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 6b04524863
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (48 sloc) 1.121 kB
require 'redcarpet.so'
module Redcarpet
VERSION = '2.0.0b5'
class Markdown
attr_reader :renderer
end
module Render
# XHTML Renderer
class XHTML < HTML
def initialize(extensions={})
super(extensions.merge(:xhtml => true))
end
end
# HTML + SmartyPants renderer
class SmartyHTML < HTML
include SmartyPants
end
# SmartyPants Mixin module
#
# Implements SmartyPants.postprocess, which
# performs smartypants replacements on the HTML file,
# once it has been fully rendered.
#
# To add SmartyPants postprocessing to your custom
# renderers, just mixin the module `include SmartyPants`
#
# You can also use this as a standalone SmartyPants
# implementation.
#
# Example:
#
# # Mixin
# class CoolRenderer < HTML
# include SmartyPants
# # more code here
# end
#
# # Standalone
# Redcarpet::Render::SmartyPants.render("you're")
#
module SmartyPants
extend self
def self.render(text)
postprocess text
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.