ocaml: enable highlighting of caml-example code fragments

pull/1236/head
Antoine Pietri 5 years ago
parent db0746c16e
commit c39f1a138b

@ -6,6 +6,17 @@ module Docs
node['data-language'] = 'ocaml' node['data-language'] = 'ocaml'
end end
css('.caml-input').each do |node|
node.content = '# ' + node.content.strip
end
css('.caml-example').each do |node|
node.name = 'pre'
node.traverse { |n| n.remove if n.text? && n.text !~ /\S/ }
node['data-language'] = 'ocaml'
end
doc doc
end end
end end

Loading…
Cancel
Save