Sha256: 638e8111b58ae09f9608df19c7df8732f91cfc8ec9339e803b35b99d95f7db71

Contents?: true

Size: 305 Bytes

Versions: 5

Compression:

Stored size: 305 Bytes

Contents

module PivotalToPdf
  module TextFormatters
    class SimpleMarkup
      attr_reader :string
      private :string
      def initialize(string)
        @string = string.to_s
      end

      def output
        string.gsub( /\*(.*)\*/,"<b>\\1</b>").gsub(/_(.*)_/, "<i>\\1</i>")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pivotal_to_pdf-1.6.0 lib/pivotal_to_pdf/text_formatters/simple_markup.rb
pivotal_to_pdf-1.4.0 lib/pivotal_to_pdf/text_formatters/simple_markup.rb
pivotal_to_pdf-1.3.4 lib/pivotal_to_pdf/text_formatters/simple_markup.rb
pivotal_to_pdf-1.3.3 lib/pivotal_to_pdf/text_formatters/simple_markup.rb
pivotal_to_pdf-1.3.2 lib/pivotal_to_pdf/text_formatters/simple_markup.rb