mirror of
https://github.com/placeholder-soft/prodigyapi.git
synced 2026-06-16 01:44:55 +08:00
13 lines
385 B
Ruby
13 lines
385 B
Ruby
module Multilang
|
|
def block_code(code, full_lang_name)
|
|
parts = full_lang_name.split('--')
|
|
rouge_lang_name = parts[0] || ""
|
|
super(code, rouge_lang_name).sub("highlight #{rouge_lang_name}") do |match|
|
|
match + " tab-" + full_lang_name
|
|
end
|
|
end
|
|
end
|
|
|
|
require 'middleman-core/renderers/redcarpet'
|
|
Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, Multilang
|