Sha256: add26d9e9ccdc84f56988a7d0c7be2b86b8c53f79b6339d3225c4c794828915b

Contents?: true

Size: 565 Bytes

Versions: 7

Compression:

Stored size: 565 Bytes

Contents

# encoding: utf-8

module Nanoc::Filters

  # @since 3.2.0
  class AsciiDoc < Nanoc::Filter

    # 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

7 entries across 7 versions & 1 rubygems

Version Path
nanoc-3.7.3 lib/nanoc/filters/asciidoc.rb
nanoc-3.7.2 lib/nanoc/filters/asciidoc.rb
nanoc-3.7.1 lib/nanoc/filters/asciidoc.rb
nanoc-3.7.0 lib/nanoc/filters/asciidoc.rb
nanoc-3.6.11 lib/nanoc/filters/asciidoc.rb
nanoc-3.6.10 lib/nanoc/filters/asciidoc.rb
nanoc-3.6.9 lib/nanoc/filters/asciidoc.rb