Sha256: 349b8935caa3acd3075d02dc563f2e3a08eb8542328dbf81f0223fb2940005fc

Contents?: true

Size: 563 Bytes

Versions: 22

Compression:

Stored size: 563 Bytes

Contents

module Rouge
  module Lexers
    class LiterateCoffeescript < RegexLexer
      tag 'literate_coffeescript'
      aliases 'litcoffee'
      filenames '*.litcoffee'

      def markdown
        @markdown ||= Markdown.new(options)
      end

      def coffee
        @coffee ||= Coffeescript.new(options)
      end

      start { markdown.reset!; coffee.reset! }

      state :root do
        rule /^(    .*?\n)+/m do
          delegate coffee
        end

        rule /^([ ]{0,3}(\S.*?|)\n)*/m do
          delegate markdown
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rouge-1.3.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-1.2.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-1.1.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.5.4 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.5.3 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.5.2 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.5.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.5.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.4.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.10 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.9 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.8 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.7 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.6 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.5 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.4 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.3 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.2 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-0.3.0 lib/rouge/lexers/literate_coffeescript.rb