diff --git a/assets/javascripts/views/pages/crystal.coffee b/assets/javascripts/views/pages/crystal.coffee new file mode 100644 index 00000000..6c2b42bb --- /dev/null +++ b/assets/javascripts/views/pages/crystal.coffee @@ -0,0 +1,6 @@ +#= require views/pages/base + +class app.views.CrystalPage extends app.views.BasePage + prepare: -> + @highlightCode @findAllByTag('pre'), 'ruby' + return diff --git a/assets/stylesheets/pages/_crystal.scss b/assets/stylesheets/pages/_crystal.scss new file mode 100644 index 00000000..2518d1bb --- /dev/null +++ b/assets/stylesheets/pages/_crystal.scss @@ -0,0 +1,7 @@ +._crystal { + @extend %simple; + + blockquote { + @extend %note; + } +} diff --git a/lib/docs/filters/crystal/clean_html.rb b/lib/docs/filters/crystal/clean_html.rb new file mode 100644 index 00000000..f95aaef1 --- /dev/null +++ b/lib/docs/filters/crystal/clean_html.rb @@ -0,0 +1,20 @@ +module Docs + class Crystal + class CleanHtmlFilter < Filter + def call + + # Remove class attr from div and child nodes + css("div").each do |node| + node.xpath("//@class").remove + end + + # Set id attributes on