Sha256: 9a8503af045fef634c66e1984effaf98ebad16d512fab6cfeeb5ec57054dd70f

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

module GhostWriter
  module Format
    module Markdown
      private
      def headword(text, level = 1)
        "#{'#'*level} #{text}"
      end

      def paragraph(text)
        text + "\n"
      end

      def separator(length)
        "-" * length
      end

      def quote(text, quote_format = nil)
        "```#{quote_format}\n#{text}\n```"
      end

      def list(text, level = 1)
        "#{"  " * (level - 1)}- #{text}"
      end

      def link(text, url)
        "[#{text}](#{url})"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ghost_writer-0.3.1 lib/ghost_writer/format/markdown.rb
ghost_writer-0.3.0 lib/ghost_writer/format/markdown.rb