Files
news.gitea.happylizard.me/bin/gems/rouge-4.5.1/lib/rouge/lexers/conf.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

26 lines
559 B
Ruby

# -*- 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