Sha256: aa37bf56a96c6b28fc2bfe51b85779d6d3dbcb2f2acf43f9089dafa8e71c3374

Contents?: true

Size: 661 Bytes

Versions: 32

Compression:

Stored size: 661 Bytes

Contents

# -*- coding: utf-8 -*- #

module Rouge
  module Lexers
    class LiterateCoffeescript < RegexLexer
      tag 'literate_coffeescript'
      title "Literate CoffeeScript"
      desc '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

32 entries across 30 versions & 6 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/rouge-2.2.1/lib/rouge/lexers/literate_coffeescript.rb
rouge-3.2.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-3.2.0 lib/rouge/lexers/literate_coffeescript.rb
rouge_ecl-1.0.0 lib/rouge/lexers/literate_coffeescript.rb
rouge_ecl-0.0.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-3.1.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-3.1.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-3.0.0 lib/rouge/lexers/literate_coffeescript.rb
rouge-2.2.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-2.2.0 lib/rouge/lexers/literate_coffeescript.rb
rougegal-2.1.2 lib/rouge/lexers/literate_coffeescript.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rouge-2.0.7/lib/rouge/lexers/literate_coffeescript.rb
tdiary-5.0.5 vendor/bundle/gems/rouge-2.0.7/lib/rouge/lexers/literate_coffeescript.rb
tdiary-5.0.5 vendor/bundle/gems/rouge-2.1.1/lib/rouge/lexers/literate_coffeescript.rb
rouge-2.1.1 lib/rouge/lexers/literate_coffeescript.rb
rouge-2.1.0 lib/rouge/lexers/literate_coffeescript.rb
tdiary-5.0.4 vendor/bundle/gems/rouge-2.0.7/lib/rouge/lexers/literate_coffeescript.rb
rouge-2.0.7 lib/rouge/lexers/literate_coffeescript.rb
rouge-2.0.6 lib/rouge/lexers/literate_coffeescript.rb
rouge-2.0.5 lib/rouge/lexers/literate_coffeescript.rb