# encoding: utf-8require'nokogiri'classBoostrappify<::Nanoc::Filteridentifier:bootstrappifydefrun(content,params={})# `#dup` is necessary because `.fragment` modifies the incoming string. Ew!# See https://github.com/sparklemotion/nokogiri/issues/1077doc=Nokogiri::HTML::DocumentFragment.parse(content.dup)doc.css('h1').eachdo|h1|h1['class']='page-header'enddoc.css('table').eachdo|table_node|nextiftable_node['class']&&table_node['class']=~/table/table_node['class']=(table_node['class']||'')+' table table-bordered'enddoc.to_sendend