Sha256: 2aeff77c5c260f095b52d0d88a7be65a9c4377e3593a5ec8973b6ad8e16a9e82
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
#-- # Dokkit filter for Deplate # (c)2006 Andrea Fazzi (and contributors) # # See 'dokkit.rb' or LICENSE for licence information. require 'deplate/converter' require 'deplate/core' require 'dokkit/filters' require 'dokkit/filters/base' require 'dokkit/deplate/fmt/latex-notemplate' require 'dokkit/deplate/fmt/html-notemplate' module Dokkit module Filters class DeplateHTML < Base def filter(text) ::Deplate::Core.declare_formatter(::Deplate::Formatter::HTMLNoTemplate,'html-notemplate') ::Deplate::Converter.new('html-notemplate').convert_string(text) end end class DeplateLatex < Base def filter(text) ::Deplate::Core.declare_formatter(::Deplate::Formatter::LatexNoTemplate,'latex-notemplate') ::Deplate::Converter.new('latex-notemplate').convert_string(text) end end class DeplateText < Base def filter(text) ::Deplate::Converter.new('plain').convert_string(text) end end end end Dokkit::Filters.register('deplate-html') { Dokkit::Filters::DeplateHTML.new } Dokkit::Filters.register('deplate-latex') { Dokkit::Filters::DeplateLatex.new } Dokkit::Filters.register('deplate-text') { Dokkit::Filters::DeplateText.new }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dokkit-0.3.0 | lib/dokkit/filters/deplate.rb |