Class: Blogit::Parsers::MarkdownParser
- Inherits:
-
Object
- Object
- Blogit::Parsers::MarkdownParser
- Defined in:
- lib/blogit/parsers/markdown_parser.rb
Instance Attribute Summary (collapse)
-
- (Object) content
readonly
A String containing the content to be parsed.
Instance Method Summary (collapse)
-
- (MarkdownParser) initialize(content)
constructor
A new instance of MarkdownParser.
-
- (Object) parsed
The parsed content.
Constructor Details
- (MarkdownParser) initialize(content)
Returns a new instance of MarkdownParser
10 11 12 |
# File 'lib/blogit/parsers/markdown_parser.rb', line 10 def initialize(content) @content = content end |
Instance Attribute Details
- (Object) content (readonly)
A String containing the content to be parsed
8 9 10 |
# File 'lib/blogit/parsers/markdown_parser.rb', line 8 def content @content end |
Instance Method Details
- (Object) parsed
The parsed content
17 18 19 20 |
# File 'lib/blogit/parsers/markdown_parser.rb', line 17 def parsed ensure_pygments_is_installed if Blogit::configuration.highlight_code_syntax markdown.render(content).html_safe end |