lib/rouge/lexers/apache.rb in rouge-3.17.0 vs lib/rouge/lexers/apache.rb in rouge-3.18.0
- old
+ new
@@ -9,17 +9,13 @@
desc 'configuration files for Apache web server'
tag 'apache'
mimetypes 'text/x-httpd-conf', 'text/x-apache-conf'
filenames '.htaccess', 'httpd.conf'
- class << self
- attr_reader :keywords
- end
- # Load Apache keywords from separate YML file
- @keywords = ::YAML.load_file(File.join(__dir__, 'apache/keywords.yml')).tap do |h|
- h.each do |k,v|
- h[k] = Set.new v
- end
+ # self-modifying method that loads the keywords file
+ def self.keywords
+ load File.join(Lexers::BASE_DIR, 'apache/keywords.rb')
+ keywords
end
def name_for_token(token, kwtype, tktype)
if self.class.keywords[kwtype].include? token
tktype