lib/kramdown/man.rb in kramdown-man-0.1.9 vs lib/kramdown/man.rb in kramdown-man-1.0.0

- old
+ new

@@ -1,7 +1,30 @@ # frozen_string_literal: true require 'kramdown' -# HACK: load our version of kramdown/converter/man.rb and not kramdown's -require_relative './converter/man' -require_relative './man/version' +require 'kramdown/man/version' +require 'kramdown/man/converter' + +module Kramdown + class Document + # + # Converts the parsed markdown document to a man page. + # + # @param [Hash] options + # Additional options. + # + # @return [String] + # The converted man page contents. + # + # @since 1.0.0 + # + # @api public + # + def to_man(options={}) + output, warnings = Kramdown::Man::Converter.convert(@root,options) + + @warnings.concat(warnings) + return output + end + end +end