Class: Jekyll::Converters::Markdown::KramdownParser

### Home Classes Methods

### In Files

- lib/jekyll/converters/markdown/kramdown_parser.rb

### Parent

Object

### Methods

- ::new
- #convert

### Files

- LICENSE

### Class/Module Index

Quicksearch

- Jekyll
- Jekyll::Command
- Jekyll::Commands
- Jekyll::Commands::Build
- Jekyll::Commands::Doctor
- Jekyll::Commands::New
- Jekyll::Commands::Serve
- Jekyll::Configuration
- Jekyll::Converter
- Jekyll::Converters
- Jekyll::Converters::Identity
- Jekyll::Converters::Markdown
- Jekyll::Converters::Markdown::KramdownParser
- Jekyll::Converters::Markdown::MarukuParser
- Jekyll::Converters::Markdown::RDiscountParser
- Jekyll::Converters::Markdown::RedcarpetParser
- Jekyll::Converters::Markdown::RedcarpetParser::CommonMethods
- Jekyll::Converters::Markdown::RedcarpetParser::WithPygments
- Jekyll::Converters::Markdown::RedcarpetParser::WithoutPygments
- Jekyll::Converters::Textile
- Jekyll::Convertible
- Jekyll::Deprecator
- Jekyll::Draft
- Jekyll::Excerpt
- Jekyll::FatalException
- Jekyll::Filters
- Jekyll::Generator
- Jekyll::Generators
- Jekyll::Generators::Pagination
- Jekyll::GistTag
- Jekyll::Layout
- Jekyll::Page
- Jekyll::Pager
- Jekyll::Plugin
- Jekyll::Post
- Jekyll::RelatedPosts
- Jekyll::Site
- Jekyll::Site::Cleaner
- Jekyll::StaticFile
- Jekyll::Stevenson
- Jekyll::Tags
- Jekyll::Tags::HighlightBlock
- Jekyll::Tags::IncludeTag
- Jekyll::Tags::PostComparer
- Jekyll::Tags::PostUrl
- Jekyll::URL
- Date
- Enumerable
- Hash
- Object

No matching classes.

# Jekyll::Converters::Markdown::KramdownParser

### Public Class Methods

new(config) click to toggle source

    # File lib/jekyll/converters/markdown/kramdown_parser.rb, line 5
    def initialize(config)
      require 'kramdown'
      @config = config
    rescue LoadError
      STDERR.puts 'You are missing a library required for Markdown. Please run:'
      STDERR.puts '  $ [sudo] gem install kramdown'
      raise FatalException.new("Missing dependency: kramdown")
    end

### Public Instance Methods

convert(content) click to toggle source

    # File lib/jekyll/converters/markdown/kramdown_parser.rb, line 14
    def convert(content)
      # Check for use of coderay
      if @config['kramdown']['use_coderay']
        ]wrap line_numbers line_numbers_start tab_width bold_every css default_lang].each do |opt|
          key = "coderay_#{opt}"
          @config['kramdown'][key.to_sym] = @config['kramdown']['coderay'][key] unless @config['kramdown'].has_key?(key)
        end
      end

      Kramdown::Document.new(content, @config["kramdown"].symbolize_keys).to_html
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.