mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-25 22:22:31 +01:00
Change from Mkdocs to slates
This commit is contained in:
parent
e2c8058de6
commit
35bae85c29
78 changed files with 19112 additions and 398 deletions
16
docs/lib/multilang.rb
Normal file
16
docs/lib/multilang.rb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue