Sha256: f15f1be6b5cea843daa994eb0f4a45544d047672c791752427841c45dee3e137

Contents?: true

Size: 476 Bytes

Versions: 14

Compression:

Stored size: 476 Bytes

Contents

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

module Rouge
  module Lexers
    load_lexer 'json.rb'

    class JSONDOC < JSON
      desc "JavaScript Object Notation with extenstions for documentation"
      tag 'json-doc'

      prepend :root do
        rule /([$\w]+)(\s*)(:)/ do
          groups Name::Attribute, Text, Punctuation
        end

        rule %r(/[*].*?[*]/), Comment

        rule %r(//.*?$), Comment::Single
        rule /(\.\.\.)/, Comment::Single
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 5 rubygems

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