Sha256: 073d3bd633ba63359c02ab31edaab99d8a9096ceee46f396653e65b8e7b11f3e

Contents?: true

Size: 556 Bytes

Versions: 2

Compression:

Stored size: 556 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

2 entries across 2 versions & 1 rubygems

Version Path
nanoc-3.8.0 lib/nanoc/filters/asciidoc.rb
nanoc-3.7.5 lib/nanoc/filters/asciidoc.rb