Sha256: fb37c83f2eaa1e4028fa50cbb125f4a614ff66fc0a283ab7cb64a673ce59faa0

Contents?: true

Size: 551 Bytes

Versions: 6

Compression:

Stored size: 551 Bytes

Contents

module Multilang
  def block_code(code, full_lang_name)
    if full_lang_name
      parts = full_lang_name.split('--')
      rouge_lang_name = (parts) ? parts[0] : "" # just parts[0] here causes null ref exception when no language specified
      super(code, rouge_lang_name).sub("highlight #{rouge_lang_name}") do |match|
        match + " tab-" + full_lang_name
      end
    else
      super(code, full_lang_name)
    end
  end
end

require 'middleman-core/renderers/redcarpet'
Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, Multilang

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
files.com-1.0.55 docs/lib/multilang.rb
arctic-vendor-1.0.1 documentation/lib/multilang.rb
arctic-vendor-1.0.0 documentation/lib/multilang.rb
arctic-vendor-0.2.4 documentation/lib/multilang.rb
arctic-vendor-0.2.3 documentation/lib/multilang.rb
arctic-ui-0.1.0 documentation/lib/multilang.rb