Sha256: 54ddb4b0f5cf98c8a63dc6549411e8c12c23d67e32959dad205088cb59ed156b

Contents?: true

Size: 592 Bytes

Versions: 43

Compression:

Stored size: 592 Bytes

Contents

# frozen_string_literal: true

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

43 entries across 43 versions & 1 rubygems

Version Path
nanoc-4.11.2 lib/nanoc/filters/asciidoc.rb
nanoc-4.11.1 lib/nanoc/filters/asciidoc.rb
nanoc-4.11.0 lib/nanoc/filters/asciidoc.rb
nanoc-4.10.4 lib/nanoc/filters/asciidoc.rb
nanoc-4.10.3 lib/nanoc/filters/asciidoc.rb
nanoc-4.10.2 lib/nanoc/filters/asciidoc.rb
nanoc-4.10.1 lib/nanoc/filters/asciidoc.rb
nanoc-4.10.0 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.9 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.8 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.7 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.6 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.5 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.4 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.3 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.2 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.1 lib/nanoc/filters/asciidoc.rb
nanoc-4.9.0 lib/nanoc/filters/asciidoc.rb
nanoc-4.8.19 lib/nanoc/filters/asciidoc.rb
nanoc-4.8.18 lib/nanoc/filters/asciidoc.rb