1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-07-01 10:46:49 +02:00
muflax65ngodyewp.onion/lib/tidy.rb

20 lines
522 B
Ruby
Raw Normal View History

2011-07-31 22:51:41 +02:00
#!/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'
2012-02-16 23:17:17 +01:00
class TidyFilter < Nanoc::Filter
2011-07-31 22:51:41 +02:00
identifier :tidy
def run(content, params={})
TidyFFI::Tidy.new(content,
:wrap => 80,
:tidy_mark => false,
:indent => 1,
:char_encoding => "utf8",
:hide_comments => true,
2011-07-31 22:51:41 +02:00
).clean
end
end