Sha256: 1227a30225cc40776766d8b7cfcf288c7954230e79f14d7dcd6ae43e6333cef6

Contents?: true

Size: 295 Bytes

Versions: 8

Compression:

Stored size: 295 Bytes

Contents

module MiniSyntax
  module Highlighter
    module ERB
      def self.highlight(code)
        code.gsub /<%(.*?)%>/ do
          "<code>&lt;%" + MiniSyntax.highlight($1, :ruby) + "%&gt;</code>"
        end
      end
    end
  end
end

MiniSyntax.register(:erb, MiniSyntax::Highlighter::ERB)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
minisyntax-0.2.5 lib/minisyntax/highlighter/erb.rb
minisyntax-0.2.4 lib/minisyntax/highlighter/erb.rb
minisyntax-0.2.3 lib/minisyntax/highlighter/erb.rb
minisyntax-0.2.2 lib/minisyntax/highlighter/erb.rb
minisyntax-0.2.1 lib/minisyntax/highlighter/erb.rb
minisyntax-0.2.0 lib/minisyntax/highlighter/erb.rb
minisyntax-0.1.2 lib/minisyntax/highlighter/erb.rb
minisyntax-0.1.1 lib/minisyntax/highlighter/erb.rb