Sha256: 94e3175df9b6c60bd41f3fae8bbf72fa4a23b1ccb31dd2b6434f9db7e0a3aa61

Contents?: true

Size: 561 Bytes

Versions: 4

Compression:

Stored size: 561 Bytes

Contents

module Nanoc::Filters
  # @api private
  class AsciiDoc < Nanoc::Filter
    identifier :asciidoc

    # Runs the content through [AsciiDoc](http://www.methods.co.nz/asciidoc/).
    # This method takes no options.
    #
    # @param [String] content The content to filter
    #
    # @return [String] The filtered content
    def run(content, _params = {})
      stdout = StringIO.new
      stderr = $stderr
      piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr)
      piper.run(%w[asciidoc -o - -], content)
      stdout.string
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.7.9 lib/nanoc/filters/asciidoc.rb
nanoc-4.7.8 lib/nanoc/filters/asciidoc.rb
nanoc-4.7.7 lib/nanoc/filters/asciidoc.rb
nanoc-4.7.6 lib/nanoc/filters/asciidoc.rb