class Rouge::Lexers::Moonscript
def self.analyze_text(text)
def self.analyze_text(text) return 1 if text.shebang? 'moon' end
def builtins
def builtins return [] unless @function_highlighting @builtins ||= Set.new.tap do |builtins| Rouge::Lexers::Lua.builtins.each do |mod, fns| next if @disabled_modules.include? mod builtins.merge(fns) end end end
def initialize(opts={})
def initialize(opts={}) @function_highlighting = opts.delete(:function_highlighting) { true } @disabled_modules = opts.delete(:disabled_modules) { [] } super(opts) end