-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
buggood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage
Description
When highlighting ruby code the matching is not correctly matching on 'if defined'
for example:
if defined?(key)
Instead of matching on the 2 keywords IF and DEFINED it instead matches on IF and DEF as keywords then matched INED as a title. The downside to this is the word defined is now in 2 different colours.
I think it is related to the use if def when defining a function in ruby and so it is matching def from the word defined and thinks you have a function called ined.
I am using version 10.5.0 of highlight.
Sample Code:
I am using sunburst.css (although this happens in others and I don't think the css is the issue)
#!/usr/bin/env ruby
require 'rubygems'
require 'gems'
require 'terminal-table'
if defined?(key)
Gems.configure do |config|
config.key = key
end
else
puts 'Using default gem creds'
end
Metadata
Metadata
Assignees
Labels
buggood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage