mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-06-30 10:36:50 +02:00
ac102f8cfa
* clean-up * basic 404 page * alternative titles * don't show comments in html
20 lines
523 B
Ruby
20 lines
523 B
Ruby
#!/usr/bin/env ruby
|
|
# coding: utf-8
|
|
# Copyright muflax <mail@muflax.com>, 2011
|
|
# License: GNU GPL 3 <http://www.gnu.org/copyleft/gpl.html>
|
|
|
|
require 'tidy_ffi'
|
|
|
|
class TidyFilter < Nanoc3::Filter
|
|
identifier :tidy
|
|
def run(content, params={})
|
|
TidyFFI::Tidy.new(content,
|
|
:wrap => 80,
|
|
:tidy_mark => false,
|
|
:indent => 1,
|
|
:char_encoding => "utf8",
|
|
:hide_comments => true,
|
|
).clean
|
|
end
|
|
end
|