Class: Blogit::Parsers::MarkdownParser
- Inherits:
-
Object
- Object
- Blogit::Parsers::MarkdownParser
- Defined in:
- lib/blogit/parsers/markdown_parser.rb
Instance Method Summary (collapse)
-
- (MarkdownParser) initialize(content)
constructor
A new instance of MarkdownParser.
- - (Object) parsed
Constructor Details
- (MarkdownParser) initialize(content)
A new instance of MarkdownParser
7 8 9 |
# File 'lib/blogit/parsers/markdown_parser.rb', line 7 def initialize(content) @content = content end |
Instance Method Details
- (Object) parsed
11 12 13 14 15 |
# File 'lib/blogit/parsers/markdown_parser.rb', line 11 def parsed renderer = Blogit::configuration.highlight_code_syntax ? Redcarpet::Render::HTMLWithAlbino : Redcarpet::Render::HTML markdown = Redcarpet::Markdown.new(renderer, Blogit.configuration.) html_content = markdown.render(@content).html_safe end |