HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rouge-3.26.1/lib/rouge/lexers/conf.rb
# -*- coding: utf-8 -*- #
# frozen_string_literal: true

module Rouge
  module Lexers
    class Conf < RegexLexer
      tag 'conf'
      aliases 'config', 'configuration'

      title "Config File"
      desc 'A generic lexer for configuration files'
      filenames '*.conf', '*.config'

      # short and sweet
      state :root do
        rule %r/#.*?\n/, Comment
        rule %r/".*?"/, Str::Double
        rule %r/'.*?'/, Str::Single
        rule %r/[a-z]\w*/i, Name
        rule %r/\d+/, Num
        rule %r/[^\w#"']+/, Text
      end
    end
  end
end