Sha256: 6346cccadf7ebad49165827278b2c5e483c89dba07a02d1c1384054cfad3cd4a

Contents?: true

Size: 383 Bytes

Versions: 2

Compression:

Stored size: 383 Bytes

Contents

require 'glue/markup'

module Nitro

module Markup
  
  include Glue::Markup
  
  # Transform the markup macros.
  # Maps #(..) to :sanitize.
  # Maps #|..| to :markup.
  
  def self.transform(text, compiler = nil)
    text.gsub!(/\#\((.*?)\)/, '#{sanitize(\1)}')
    text.gsub!(/\#\|(.*?)\|/, '#{markup(\1)}')
    return text
  end
  
end

end

# * George Moschovitis <gm@navel.gr>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.30.0 lib/nitro/compiler/markup.rb
nitro-0.31.0 lib/nitro/compiler/markup.rb